Boost logo

Boost Users :

Subject: Re: [Boost-users] Serialization: multiple definition of'boost::archive::detail::init_guid...
From: Robert Ramey (ramey_at_[hidden])
Date: 2011-03-25 02:19:49


Marco Piacentini wrote:
> Hi guys...I've found on google some people with the same problem, but
> all of them have a partial solution...
> In practice this error happens where I include a .h file which
> contain the directive
>
>
> #include <boost/archive/text_oarchive.hpp>#include
> <boost/archive/text_iarchive.hpp>and the macroBOOST_CLASS_EXPORT()in
> more than one .cpp file...I have the necessity to
> serialize/deserialize in more than one .cpp file and at these points
> I have toinclude the .h which contains the polymorphic struct that I
> have to serialize/deserialize. So the partial solution proposed from
> others to put all the the include in a single file, is not praticable
> for me..Do you know another solution?thank you very much...Bye..

The most recent version of the library has
macroBOOST_CLASS_EXPORT_KEY and macroBOOST_CLASS_EXPORT_IMPL
to help with this issue. Check the most recent documentation.

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