boost build with fPIC

在build so檔時如果要static link boost ,出現error message

… can not be used when making a shared object; recompile with -fPIC

需要將boost static build加上PIC的參數

./b2 cxxflags=”-fPIC” link=static install

參考: https://stackoverflow.com/questions/49129115/linking-boost-static-libraries

This entry was posted in C++ Language. Bookmark the permalink.

Leave a Reply