Boost logo

Boost Users :

Subject: Re: [Boost-users] [serialization] polymorphic archivesindllsandpointer to derived problems
From: Kolb, Jeremy (jkolb_at_[hidden])
Date: 2011-01-04 17:38:13


> -----Original Message-----
> From: boost-users-bounces_at_[hidden] [mailto:boost-users-
> bounces_at_[hidden]] On Behalf Of Robert Ramey
> Sent: Tuesday, January 04, 2011 4:20 PM
> To: boost-users_at_[hidden]
> Subject: Re: [Boost-users] [serialization] polymorphic
> archivesindllsandpointer to derived problems
> >
> >> int _tmain(int argc, _TCHAR* argv[])
> >> {
> >> std::ofstream f("c:\\test.xml");
> // note creation of derived type of archive asigned to the
> base
> type of archive !!
> >> boost::archive::polymorphic_oarchive & xml =
> >> boost::archive::polymorphic_xml_oarchive(f);
> >>
> >> Base* b = new Derived(123);
> // now serialization should proceed through
> polimorphic_oarchive
> interface
> >> xml & BOOST_SERIALIZATION_NVP(b);
> >>
> >> delete b;
> >>
> >> return 0;
> >> }

Oops: realized I was top posting. Unfortunately the above doesn't work.
It's the same problem. While the classes are registering with the DLL I
don't think the executable is looking in the right place. I tried to
pull the export.hpp file out of the executable thinking that might do it
but it didn't help.


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