I am having an issue compiling my program here are my gcc options used
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
output
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
Does anyone know why this is happening ? thanks
Install the boost library using
apt-get install libboostIf you have any issues installing libboost, refer this link in order to get them clarified.
After doing this, you can recompile boost with -fPIC flag in order to resolve the issue. I think the warning itself is helpful to identify your issue.