|
Boost Users : |
From: Michael Shapiro (mshapiro_at_[hidden])
Date: 2006-02-12 12:59:00
I would like to use the boost serialization library to do checkpointing for a
simulation which runs for one or more weeks. However, I have not been able
to get past the "hello world" stage. I have tried to do this on both a linux
machine running gcc 3.4.5 and Mac OS X using gcc 3.3. In both cases, my
attempts to compile the demo.cpp program fail with long lists of undefined
symbols.
I will give the specifics for the Mac because this is where it will ultimately
be used and because the instalation seems more standard there.
The demo.cpp I am trying to compile is the one available on
http://www.boost.org/libs/serialization/doc/tutorial.html
The boost include files are installed in
/usr/local/boost/gcc/
The libraries are installed in
/usr/local/lib/
For example, here I find libboost_serialization.a and
libboost_serialization.dylib.
I am attempting to compile as follows:
gcc \
-L/usr/local/lib/ \
-I/usr/local/include/ \
-lboost_serialization \
demo.cpp
I have tried various variations on this including adding all the .a files to
the list of libraries to link, and adding stdc++. I get error messages of
which the following are typical
ld: Undefined symbols:
__ZNKSs5c_strEv
__ZNKSt9basic_iosIcSt11char_traitsIcEE4failEv
__ZNSaIcEC1Ev
__ZNSaIcED1Ev
followed by more of the same.
I have no doubt there is something very simple I am failing to do, very likely
something so simple no one knowledgeable would think to put it in the
documentation. So I will probably feel very dumb when someone educates me
about this, but I will also feel very relieved.
Thanks in advance for your help.
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