I'm having trouble linking the stxxl static library in a shared library, as stated in my question Linking a static library to Boost Python (shared library) - Import error
The team I used was
g++ -Wall -pthread -march=i686 -I/home/zenna/Downloads/stxxl-1.3.0/include -include stxxl/bits/defines.h -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -I /home/zenna/local/include/ -I /usr/include/python2.6/ -fPIC -c partition.cpp -o obj/Partition_wrap.o
and link:
g++ -shared -lboost_python -L/home/zenna/local/lib/ -L/home/zenna/Downloads/stxxl-1.3.0/lib/bk/ -Wall -pthread -L/home/zenna/Downloads/stxxl-1.3.0/lib -lstxxl -o lib/fast_parts.so obj/Partition_wrap.o
Using nm, I found that the missing characters were in the final output library of shared objects, but were of type “U” for undefined.
Then I changed the bind command to not only use -lstxxl, but also add the entire archive file as another input to the linker
so the new team was (difference at the end)
++ -shared -lboost_python -L/home/zenna/local/lib/-L/home/zenna/Downloads/stxxl-1.3.0/lib/bk/-Wall -pthread -L/home/zenna//stxxl-1.3.0/lib -lstxxl -o lib/fast_parts.so obj/Partition_wrap.o obj/libstxxl.a
, .
-l- undefined?