
Hi Robert, Indeed the more recent documentation addresses this. http://www.boost.org/doc/libs/1_47_0/libs/serialization/doc/traits.html#expo... So I added BOOST_CLASS_EXPORT_KEY2(B, "B") to my b header and BOOST_CLASS_EXPORT_IMPLEMENT(B) to b's cpp file. I do not get the duplicate symbol anymore, good. However the serialization now crashes. My main is simply: int main() { std::ofstream of("mybin.bin"); boost::archive::binary_oarchive oa(of); A* b = new B(); oa << b; return 0; } Any idea ? Thanks, -V On Dec 2, 2011, at 8:21 AM, Robert Ramey wrote:
V D wrote:
If I don't have 2 files, then of course I don't have duplicate symbols and the serialization of the polymorphic object works fine.
Any idea how to resolve this issue?
Look into the more recent documentation for EXPORT_KEY and EXPORT_IMPL which addresses this exact issue.
Thank you -V
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost