boost 静态库编译时不带-fPIC选项的一种解决方法

转自 :

https://blog.****.net/lzshlzsh/article/details/50110771


错误表现: 
libboost_system.a(error_code.o): relocation R_X86_64_32 against `.rodata.str1.1’ can not be used when making a shared object; recompile with -fPIC 
/usr/local/lib/libboost_system.a: error adding symbols: Bad value 
解决方法: 
编辑tools/build/v2/tools/gcc.jam 
boost 静态库编译时不带-fPIC选项的一种解决方法