Boost logo

Boost Users :

Subject: Re: [Boost-users] BOOST_CLASS_EXPORT_GUID with custom archive
From: Robert Ramey (ramey_at_[hidden])
Date: 2014-12-13 00:33:15


Elizabeta wrote
> Hi
> I am using boost 1.49. I have custom archives derived from the boost
> binary archives.
> <snip>
> ...
> BOOST_SERIALIZATION_REGISTER_ARCHIVE(CloneBinaryIArchive)

The above looks good to me.

> and here is the cpp file in each I am registering all classes :
> --------------
> register.cpp
> ---------------
> #include "customarchive.h"
> #include &lt;boost/serialization/export.hpp&gt;
> #include "A.h"
> BOOST_CLASS_EXPORT_GUID(A,"A")

Note that in subsequent versions of the library and documentation the
BOOST_CLASS_EXPORT... macros have been redesigned somewhat to separate
declaration from instantiation. The older macros you're using can work but
they are confusing to get right. Look at the latest documentation to see
the difference. You can then either then tweak your code to work with the
older macros or use a later version of boost. In any case, reading the more
recent documentation should help clarify what is going on.

Robert Ramey

--
View this message in context: http://boost.2283326.n4.nabble.com/BOOST-CLASS-EXPORT-GUID-with-custom-archive-tp4670051p4670116.html
Sent from the Boost - Users mailing list archive at Nabble.com.

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