|
Boost Users : |
Subject: Re: [Boost-users] [serialization]polymorphicarchivesindllsandpointer to derived problems
From: Kolb, Jeremy (jkolb_at_[hidden])
Date: 2011-01-06 13:31:23
> -----Original Message-----
> From: boost-users-bounces_at_[hidden] [mailto:boost-users-
> bounces_at_[hidden]] On Behalf Of Robert Ramey
> Sent: Tuesday, January 04, 2011 11:54 PM
> To: boost-users_at_[hidden]
> Subject: Re: [Boost-users]
> [serialization]polymorphicarchivesindllsandpointer to derived problems
>
> Double check this to see if this helps.
>
> Robert Ramey
>
> Derived.cpp:
>
> #include "Derived.h"
>
> #include "boost/serialization/nvp.hpp"
> #include "boost/serialization/nvp.hpp"
>
> // make sure these are included BEFORE the EXPORT below.
> // code is intantiatiated only for archives already "seen"
>
> #include "boost/archive/polymorphic_iarchive.hpp"
> #include "boost/archive/polymorphic_oarchive.hpp"
>
> template<class Archive>
> void Derived::serialize(Archive& ar, const unsigned int version)
> {
> ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(Base);
> ar & BOOST_SERIALIZATION_NVP(j);
> }
>
> BOOST_CLASS_EXPORT_IMPLEMENT(Derived);
> template void __declspec(dllexport)
> Derived::serialize(boost::archive::polymorphic_iarchive& ar, const
> unsigned
> int version);
> template void __declspec(dllexport)
> Derived::serialize(boost::archive::polymorphic_oarchive& ar, const
> unsigned
> int version);
>
That doesn't help either. I've attached a zip of my visual studio
solution so you can see what I've done (it's right before this change
but it should be equivalent).
Jeremy
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