I've been trying to get Boost serialization working for dynamically loaded shared libraries. Here's my basic structure simplified: 1. base.hpp - includes an abstract base class called base 2. derived.hpp - includes a derived class from base. includes base.hpp. 3. derived.cpp - includes code for derived class and for dynamically loading it 4. main.cpp - includes base.hpp but NOT derived.hpp. dynamically loads instantiates a base * which points to a derived object from derived.so Now in main I want to be able to serialize my pointer to the loaded derived class: base *obj = create_func(); //obj now points to a derived object obj->test(); //when test is run it correctly outputs the message from derived.cpp const base *to_serialize = obj; //it seems to want a const pointer in order to serialize std::ofstream ofs("filename"); boost::archive::text_oarchive oa(ofs); oa << (*to_serialize); main.cpp compiles fine, but when it gets to the last line there, the serialize method in base is called, not the one in derived. I read http://www.boost.org/libs/serialization/doc/serialization.html#derivedpointe... http://www.boost.org/libs/serialization/doc/serialization.html#derivedpointe... but it doesn't seem to address this problem (unless I missed something?). I can't use the BOOST_CLASS_EXPORT_GUID(derived, "derived") macro discussed on that page because main does not know what a derived object is (this is the whole point of having this plugin system). Is there any way I can make boost serialization correctly serialize the derived class from the base pointer when the derived object is known only to a dynamically loaded library? Thank you for your help, Jeshua Bratman -- View this message in context: http://www.nabble.com/Boost-Serialization-with-a-dynamically-loaded-shared-l... Sent from the Boost - Users mailing list archive at Nabble.com.