[PyKDE] Help needed with SIP
gvermeul at labs.polycnrs-gre.fr
gvermeul at labs.polycnrs-gre.fr
Sat Aug 18 22:30:46 BST 2001
> Hello
>
> I have the same problem that Joerg JKaercher reported 8 Jun 2001, unfortunatly his email
conversation with Phil did not seem to come to any conclusion. So Im stuck.
>
> I compile my extension (source below) with no error, then get the following error when
importing:
>
> Traceback (most recent call last):
> File "MMM.py", line 6, in ?
> import libMMMc
> ImportError: /usr/lib/python2.1/site-packages/libMMMcmodule.so: undefined symbol:
__ti3CCC
Hi John,
I see at least one reason why: you did not link in a library or an object
file containing code from CCC.cpp.
A quick and dirty solution (just to see if it works) is to replace the
following lines in your Makefile template (in the sip file)
> MMM_SOURCES = \
> $S \
> MMM.py
by
MMM_SOURCE = \
CCC.cpp \
$S \
MMM.py
and put CCC.cpp in the directory where sip puts its generated generated
source code.
Later, you could make a library out of CCC.cpp & friends, then you have
to add a library libCCC.so to
>lib$mcmodule_la_LIBADD = -L/usr/lib/qt2/lib -L$$(DESTDIR)$$(libdir) -lqtcmodule <- add
libCCC.so (order of linking might be important).
With such changes it might work. Since you are using libtool-1.4, I would
advise you to remove the libqtcmodule-2.5.la file from
/usr/lib/python2.1/site-packages/
(libtool-1.4 is much stricter than previous versions and imposes its own
linking order -- this interferes order of initialization of static objects in
C++ libraries -- you might get away with it this time, but expect erratic
behaviour).
[..]
removed listings
[..]
Hope this helps, Gerard
---------------------------------------------
This message was sent using Endymion MailMan.
http://www.endymion.com/products/mailman/
More information about the PyQt
mailing list