Python Extension Module With Embedded Python Calls Wrong Library
Solution 1:
Under Windows, DLLs (Linux shared objects analogue) must resolve all of their external symbols during the link phase, so during the build of your extension, the extension is implicitly linked w/ python 3.0 DLL and everything is working just fine (w/o seeing MSVC command line, I'm almost sure the extension is linked w/ stub library located under something like c:/python33/libs/python33.lib
)
Under Linux on the other hand, shared objects default link regime isn't resolving all the external symbols, hence the LD specification of -lpython
will probably resolved during runtime to the loaded shared objects which is 2.7 based ...
So you've 2 options :
Since you got the sources, under Linux you can load libpython33.so via
dlopen
dynamically to avoid this "DLL hell"static approach, you shall specify the exact location of python3.3 i.e. instead of the "vague"
-lpython
(which resolved to python2.7) something like/usr/lib/python3.3/libpython33.so
Post a Comment for "Python Extension Module With Embedded Python Calls Wrong Library"