I\'m developing a C shared library that makes a call to a python script. When I run the application I get this error:
Traceback (most recent call last):
Fi
I use such workaround: explicit linking of plugins from lib-dynload directory (it's simply, then explicit dlopen in code). Example with datetime.so:
cmake:
SET ( CMAKE_SHARED_LINKER_FLAGS "/usr/lib/python2.7/lib-dynload/datetime.so" )
or just add /usr/lib/python2.7/lib-dynload/datetime.so as linker parameter to gcc in command line:
g++ -shared -o libfoo.so foo.o -lbar -lzab /usr/lib/python2.7/lib-dynload/datetime.so