solved - Can't dynamically load shared lib that is statically linked to boost thread
2 Feb
2012
2 Feb
'12
5:05 a.m.
Well it turns out despite not receiving any link errors I wasn't linking to libboost_thread.a as I thought I was. On Windows this seems to be handled by the auto link facility and I figured the same on linux. Which explains why when I explicitly link to the shared libboost_thread.so everything worked. However explicitly linking to the static libboost_thread.a resulted in a link error of relocation R_X86_64_32 ... recompile with -fPIC. Doing a custom compile with the fPIC option set fixed that. ./bjam -a --prefix=/usr/local/boost_1_47_0 cxxflags=-fPIC --with-thread This only seems to have updated the stage directory though and not boost_root/lib. Not sure why that is as I didn't pass the --stage option.
4665
Age (days ago)
4665
Last active (days ago)
0 comments
1 participants
participants (1)
-
Greg Carter