
Hello,
I am having difficulties statically compiling the demo program at
http://www.boost.org/libs/serialization/example/demo.cpp
on Linux (Linux 2.6.15-1.1831_FC4 #1 SMP Tue Feb 7 13:37:59 EST 2006
x86_64 GNU/Linux) with gcc version 4.0.2 20051125.
When I try:
g++ -o demo -I /path/boost/ -L /path/boost/ -lboost_serialization demo.cpp
it works fine, but I get a program which needs dynamic versions of the
serialization library.
However, I would like to compile against the static versions of
the Boost.Serialization library.
If I try
g++ -static -o demo -I /path/boost/ -L /path/boost/ -lboost_serialization demo.cpp
the linker complains of a lot of undefined references, like
/tmp/ccFAJsqB.o(.gnu.linkonce.r._ZTIN5boost13serialization16void_cast_detail21void_caster_primitiveIK20bus_stop_destinationK8bus_stopEE[typeinfo
for
boost::serialization::void_cast_detail::void_caster_primitive