Reputation: 83
I'm Trying to Link boost library with our code, I'm Getting the Following error
ld: /boost/lib/laxno/libboost_thread.a(thread.o): relocation R_X86_64_PC32 against undefined hidden symbol `_ZTCN5boost10wrapexceptINS_21thread_resource_errorEEE0_NS_16exception_detail10clone_implINS3_19error_info_injectorIS1_EEEE' can not be used when making a shared object ld: final link failed: Bad value
I have built the boost with the GCC 7.4.0 with the following command ./b2 cxxflags="-fPIC -std=c++14" cflags="-fPIC" -j4
Getting the following error if I exclude the "-fPIC" flag while building the boost libs:
/boost/lib/laxno/libboost_thread.a(thread.o): relocation R_X86_64_32 against `.text' can not be used when making a shared object; recompile with -fPIC /boost/lib/laxno/libboost_thread.a: could not read symbols: Bad value
Upvotes: 1
Views: 1914
Reputation: 83
Using the boost libs and boost .so files from the boost install location instead of build location fixed the issue.
Upvotes: 1