Boost logo

Boost Users :

From: Robert Ramey (ramey_at_[hidden])
Date: 2006-06-16 01:33:33


Hugh Hoover wrote:
> I have a test program (boost::test) for a set of my application
> classes. When run on darwin (10.4.6, gcc4.01) the tests work
> correctly - that is, I can serialize the structure to an XML archive
> and read it back (actually, all 3 archive types). When I run the
> same test on windows (XP sp2, vc8), the read back of the XML archive
> fails very early because it apparently can't find an appropriate
> class to instantiate.

Its not clear what you're doing here. Is the second test reading the
archive
created by the first test on a different machine or is it reading an
archive created on the same machine?

> When I look at the XML output, the windows version has a class name
> at the point where it fails, while the darwin version does not (there
> are NO class names written in the darwin archive).

The should look identical.

> The code between darwin and windows is essentially the same - there
> aren't any differences in MY code in the serialization code.

Hmmm - "essentially" ? - why is the code not identical?

Is BOOST_CLASS_EXPORT used in the second test - that is
where the class names come from.

> Several points:
> a) The topmost level is a pointer (plain) to an abstract class - the
> concrete subclass being serialized is very simple at this point.
> b) The specific class that's failing is from an STL map with pointers
> to an abstract base class.

The class thats failing is the STL map or is it a member of the map?

> 1) That particular failing class is successfully tested prior to
> where it fails in the same test application (output to all archive
> types and read-back).
> 2) although it's using a different archive to test, initialization
> of all archives is identical (register_type and register_void_pointer
> called as appropriate)
> c) There is one other class that also gets serialized with a class
> name in addition to it's ID (I presume this means that something's up
> with class registration?)
>
> Ok - any suggestions on how to tackle this? I can't find anything
> wrong in the registration (i've walked through my part of the
> registration code in the debugger).

I would suggest posting a small example which we can run.

Robert Ramey

>
> I'm using boost 1.33.1
>
> Thanks
>
>
>
> Hugh Hoover
> Enumclaw Software


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