[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
> Traceback (most recent call last):
>   File "MMM.py", line 6, in ?
>     import libMMMc
> ImportError: /usr/lib/python2.1/site-packages/libMMMcmodule.so: undefined symbol:

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)
>  $S \
>  MMM.py
    CCC.cpp \
    $S \
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
(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

removed listings

Hope this helps, Gerard

This message was sent using Endymion MailMan.

More information about the PyQt mailing list