I'm not sure what "shared object" means here. CClasifier contains: ... CLabels * labels; template<class Archive> serialize(Archive &ar , unsigned int version){ ar & labels; } .... Which should be fine as is if labels in fact a pointer to one instance of CLabels. If labels is a base class pointer to a more derived type, it,s THAT derived type which must be exported. Robert Ramey Christian Widmer wrote:
Dear Robert,
thank you for your reply. After struggling with some other issues for a couple days, I've compiled boost-1.34 with the serialization patch from your website, as you suggested.
In deed, the "unregistered class" problem disappeared, but was unfortunately replaced by a "unregistered void cast" exception when trying to serialize across shared-object boundaries.
All classes are registered using BOOST_CLASS_EXPORT in their respective .cpp file, yet I can't get it to work. I attached a piece of my code to this email. The attached archive contains the following files:
- Classifier.h - Classifier.cpp - Labels.h - Labels.cpp
The class CClassifier has a field labels of type CLabels. The classes are contained in two separate shared-objects. When trying to serialize an object of type CClassifier, an exception gets thrown when attempting to serialize the field labels. Any ideas?
Best regards,
Christian Widmer