|
Boost Users : |
Subject: Re: [Boost-users] Problem using serialization::xml_archive withpolymrphic classes
From: Robert Ramey (ramey_at_[hidden])
Date: 2010-09-02 18:18:28
przemyslaw.sliwa_at_[hidden] wrote:
> Thanks for reply,
>
> All classes a, b, c and d are actually defined within one dll (one
> module). I forgot to mention it.
> I can do this following thing:
>
> d* pD = mew d();
>
> and then
> ar & boost::serialization::make_nvp("item", pD);
>
> but
> c* pD = new D();
> ar & boost::serialization::make_nvp("item", pD);
>
> does not work at all! It throws this strange type of exceptions which
> I cannot handle at all.
This should work if d is exported BOOST_SERIALIZATION_EXPORT(d)
> Another problem is that if I do the first version the member m_key
> variable of true_type in the call
>
> const boost::serialization::extended_type_info * true_type =
> i.get_derived_extended_type_info(t);
again This should work if d is exported BOOST_SERIALIZATION_EXPORT(d)
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