#ifdef B_SOURCE # define B_DECL __declspec(dllexport) #else # define B_DECL __declspec(dllimport) #endif #define BOOST_ALL_DYN_LINK //Always use dynamic linking #define BOOST_ALL_NO_LIB //Newer link automagically #include #include #include "X.hpp" class B_DECL B { public: B(const std::string&, float); template void serialize(Archive& ar, const unsigned int version) { ar & boost::serialization::make_nvp("foo", foo); ar & boost::serialization::make_nvp("bar", bar); } std::string foo; X bar; }; B_DECL void load(B&); B_DECL void save(const B&);