Boost logo

Boost Users :

From: Michael Shapiro (mshapiro_at_[hidden])
Date: 2006-01-23 16:49:22


I am having problems linking a program using the serialization library.
   
I have made a small program, considerably simpler than the demo.cpp listed at
http://www.boost.org/libs/serialization/doc/tutorial.html
and I have also tried linking demo.cpp itself.

My hpp files are in
/home/mshapiro.local/boost/include/boost-1_32/boost/

My libraries are in
/home/mshapiro.local/boost/lib/

I have tried linking this code with gcc 3.4.5 on a linux machine using

gcc -I/home/mshapiro.local/boost/include/boost-1_32/ \
-L/home/mshapiro.local/boost/lib/  \
-lboost_serialization-gcc \
demo.cpp

I have tried many variations on this! (For example, I have tried g++ instead
of gcc, I have tried all variations on the serialization library, such as  
boost_serialization-gcc-d-1_32, etc, I have tried turning off warnings as
suggested in the compiler specific issues.)  I can compile using the -c flag,
but I cannot link it.  I get a large number of error messages all of which
look much like

/tmp/ccuSnkzu.o(.gnu.linkonce.t._ZN5boost7archive18text_oarchive_implINS0_13text_oarchiveEED1Ev+0x51):
In function
`boost::archive::text_oarchive_impl<boost::archive::text_oarchive>::~text_oarchive_impl()':
: undefined reference to
`boost::archive::basic_text_oprimitive<std::basic_ostream<char,
std::char_traits<char> > >::~basic_text_oprimitive()'

I can find various references to this exact problem in the newsgroups, but can
find no solution to it.

Your help would be greatly appreciated.

Many thanks in advance,
Michael Shapiro


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net