|
Boost Users : |
From: Robert Ramey (ramey_at_[hidden])
Date: 2006-05-01 20:43:05
I use the vector "children" to hold pointers to both base and derived
objects. I have tried registering the derived classes at the top of the
serialize function call, with the use of
ar.register(static_cast<ASTNode*>(NULL)).
That is probably the wrong place to put it. should be in a place that
guarentees that it will be called. Try it just after the archive is
created.
If that does it, you can experiment with moving it around.
I have also tried using the
BOOST_CLASS_EXPORT_GUID macro to register the classes in main. Yet, I still
get a unregistered class exception. Any guidance would be greatly
appreciated.
Note that its not enough to include BOOST_CLASS_EXPORT. It has to
be included after the *archive.hpp classes that you're using. Double check
that this is the case.
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