|
Boost Users : |
From: Robert Ramey (ramey_at_[hidden])
Date: 2004-12-21 13:17:27
zhengyi wrote:
> Serialization Lib doesn't have any single header file that can
> include for all.
> you must include every class header file separately.
>
true. You only need to include headers which describe the features of the
library that you actually use. Many applications will compile build and run
with:
#include <boost/archive/text_iarchive.hpp>
#include <boost/archive/text_oarchive.hpp>
#include <boost/serialization/base_object.hpp>
> And what's the archive ? What is it's role ?
> Does it is an other liberary?(There is not any info in the downloaded
> Doc ).
The very first line of the tutorial says
"An output archive is similar to an output data stream. Data can be saved to
the archive with either the << or the & operator"
I think that, along with the example, that should be pretty clear.
> My Test code can't link successfully. The linker said there are some
> unresolved external symbol.
> It seems that some class was implemented in files in the archive. But
> this dir is
> not a "project",and the bjam do not compile it .it is simple copy
> file to the destination.
> It seems that those classes were not exposed by the serialization
> project
This suggests the appropriate serialization library has not been included in
the link step. Have you in fact built the boost libraries. That is, have
you run bjam with "stage" ?
Have you been able to build and run one of demo applications - for example
demo.cpp ?
Robert Ramey
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