I am creating a Python Boost module (shared library file) that depends on another external library (STXXL)
While I can create and import Python Boost modules, I run into problems when STXXL is thrown into the mix. In particular, when running import fast_partsin python
I get ImportError: ./fast_parts.so: undefined symbol: _ZN5stxxl10ran32StateE
This tells me that the STXXL library is not linked, but I'm not sure how it can be, since I am linking to it and the linker is not giving me any errors. It is worth noting that I can successfully create and run standalone programs using STXXL, and as far as I know, the libraries are stored in the .a archive in the lib directory shown below. I reduced my Makefile to one command as follows:
g++ -I/home/zenna/Downloads/stxxl-1.3.0/include -include stxxl/bits/defines.h -I/home/zenna/local/include -I/usr/include/python2.6 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -O3 -Wall -g -DFOO=BAR -pthread -L/home/zenna/Downloads/stxxl-1.3.0/lib/ -lstxxl -L/home/zenna/local/lib/ -lboost_python -lpython2.6 -fPIC -shared -o fast_parts.so partition.cpp
Any tips?
source
share