我在编译程序时遇到问题,这是我使用的 gcc 选项
g++ -shared -fPIC -fvisibility -L/usr/lib/x86_64-linux-gnu/ -lboost_serialization-mt -lboost_thread-mt -lboost_date_time-mt -lboost_iostreams-mt -lboost_program_options-mt -lboost_filesystem-mt -lboost_system-mt
输出
relocation R_X86_64_32S against `vtable for boost::detail::sp_counted_base' can not be used when making a shared object; recompile with -fPIC
could not read symbols: Bad value
有谁知道为什么会这样?谢谢