[Serialization] Undefined reference to... (header or compilation problem)

Hello,
I wonder if anyone could help me with my problem.
I'm trying to serialize my project's data. Beeing new to the boost libs I
started with simple tutorial example. Today is the 3rd day I'm unable to
launch a serialization of an object of the simpliest Vertex class
containing 2 double values.
The errors I get follow this patern:
[mack/.../]$ g++ -Wall -o main test3.cpp
/tmp/ccQkfdAS.o
(.gnu.linkonce.t._ZN5boost7archive18text_oarchive_implINS0_13text_oarchiveEED2Ev+0x31):
In function
`boost::archive::text_oarchive_implboost::archive::text_oarchive::~text_oarchive_impl()':
: undefined reference to
`boost::archive::basic_text_oprimitive

add the "const" Read the "rationale" section of the documentation for an explanation. Robert Ramey
int main() {
const Vertex v1(1.5, 2.5); // add "const" here std::ofstream ofs("myfile.vtx");
boost::archive::text_oarchive oa(ofs);
oa << v1; ofs.close();
return 0; }
participants (2)
-
mishaï¼ gildia.pl
-
Robert Ramey