[C++-sig] importing issues with c++ shared dynamic libraries (.so)

Tim Spens t_spens at yahoo.com
Fri Jul 13 17:52:12 CEST 2007


I'm trying to import multiple c++ shared dynamic
libraries (.so) with inter-dependencies into python. 
Then use one of the .so libraries which I've added
boost.python wrappers to.  Here's the out put from
python...

using boost 1.33

Python 2.5.1 (r251:54863, May  2 2007, 16:56:35) 
[GCC 4.1.2 (Ubuntu 4.1.2-0ubuntu4)] on linux2
Type "help", "copyright", "credits" or "license" for
more information.
>>> 
>>> import libxml2
>>> #libxml2.so imported just fine
>>> 
>>> import libboost_thread
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: dynamic module does not define init
function (initlibboost_thread)
>>> 
>>> import libboost_serialization
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: dynamic module does not define init
function (initlibboost_serialization)
>>> 
>>> import libboost_python
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: dynamic module does not define init
function (initlibboost_python)
>>> 
>>> import libX
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: dynamic module does not define init
function (initlibX)
>>> libX.so is a c++ dynamic shared library with no
boost.python wrappers
>>> 
>>> import libShared
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: libShared.so: undefined symbol: xmlFree
>>> libShared.so is a c++ dynamic shared library with
no boost.python wrappers
>>> 
>>> import libzee
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: ./libzee.so: undefined symbol:
_ZTIN5boost10lock_errorE
>>> libzee.so is a c++ dynamic shared library with
boost.python wrappers added

I've tried using ld.open but it seems to only allow me
to call specific functions in the libraries and
doesn't allow the libraries to talk to each other.

Any help will be greatly appreciated.


       
____________________________________________________________________________________Ready for the edge of your seat? 
Check out tonight's top picks on Yahoo! TV. 
http://tv.yahoo.com/



More information about the Cplusplus-sig mailing list