id summary reporter owner description type status milestone component version severity resolution keywords cc 5368 "Item for ""Tips and Tricks"" list in dokumentation" schorsch_76@… Robert Ramey "How to handle BOOST_CLASS_EXPORT_KEY/BOOST_CLASS_EXPORT_IMPLEMENT in several static libraries and avoid linking errors? == Make Header Archive.h == Make a Header ""Archive.h"". Include Everything for your serialization here. Example: {{{ #!div style=""font-size: 80%"" Code highlighting: : {{{#!C #ifndef __Archive_h__ #define __Archive_h__ // STL Archive + stuff #include #include #include #include #include #include // IMPORTANT: Archive Headers at last // include headers that implement a archive in xml format #include #include #include typedef boost::archive::xml_oarchive oarchive; typedef boost::archive::xml_iarchive iarchive; #endif // __Archive_h__ }}} }}} == Define your classes as following == Myclass.h {{{ #!div style=""font-size: 80%"" Code highlighting: : {{{#!C #include ""Archive.h"" class Myclass { public: Myclass(); ~Myclass(); double md_data; private: friend class boost::serialization::access; // When the class Archive corresponds to an output archive, the // & operator is defined similar to <<. Likewise, when the class Archive // is a type of input archive the & operator is defined similar to >>. template void serialize(Archive & ar, const unsigned int version) { ar & BOOST_SERIALIZATION_NVP(md_data;); } }; BOOST_CLASS_VERSION(Myclass, 0) BOOST_CLASS_EXPORT_KEY(Myclass) }}} }}} == Implementationfile of your class == Myclass.cpp {{{ #!div style=""font-size: 80%"" Code highlighting: : {{{#!C Myclass::Myclass() { } Myclass::~Myclass() { } BOOST_CLASS_EXPORT_IMPLEMENT(Myclass) }}} }}} == Conclusion == Thats the way i made it working in my project with VC10 and boost 1.46.1 . My project consists of several static libraries which have dependencies under each other. Main dependency is the library which contains the serializable classes. Hopefully this will help some people :-) Best Regards Georg" Patches closed To Be Determined serialization Boost Release Branch Optimization invalid Boost 1.46.1