Boost logo

Boost Users :

From: Jeshua Bratman (bratman_at_[hidden])
Date: 2007-09-04 18:08:36


John Pye-4 wrote:
>
> Hi Jeshua,
>
> Vaguely related comment on your problem. I was also recently seeing this
> "unregistered void cast" runtime error. As far as I could tell it was a
> problem relating to my ordering and placement of "#include
> <boost/archive/text_oarchive.hpp> (or ditto iarchive), and "#include
> <boost/serialization/export.hpp> as well as calls to BOOST_CLASS_EXPORT.
>
> It was nothing to do with my use of void_cast_register, which in fact I
> don't use anywhere in any of my code.
>
> So FWIW I think that this error message is not particularly helpful or
> well-worded.
>
> Cheers
> JP
>
JP,

Thanks for the comment.

This issue was mentioned to me in my previous message I sent out. I believe
I have the includes ordered correctly. What Robert said was that I need to
include the archives before the export header file. Here's the order in
which I include the serialization headers:

#include <boost/archive/text_oarchive.hpp>
#include <boost/archive/text_iarchive.hpp>
#include <boost/serialization/serialization.hpp>
#include <boost/serialization/base_object.hpp>
#include <boost/serialization/export.hpp>

Here is my code just to make things easier. There should be 5 files:
Makefile
main.cpp
base.hpp
derived.hpp
derived.cpp

http://www.nabble.com/file/p12487645/serialization_dynamic_test.tar.gz
serialization_dynamic_test.tar.gz

Thanks,
Jeshua Bratman

-- 
View this message in context: http://www.nabble.com/-boost%3A%3Aserialization--Serializing-Dynamically-Loaded-Libraries---%22Unregistered-Void-Cast%22-tf4338680.html#a12487645
Sent from the Boost - Users mailing list archive at Nabble.com.

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