
That solution is really impractical, IMHO. If this is really the only solution, I would consider the serialization lib broken wrt to DLLs, and that should be in the docs somewhere. That's really too bad, since it is such a nice and useful library! I.e. how would you solve the following, if A and B are unrelated libraries in seperate DLLs sharing a class X that is serialized as part of serializing A and B? //dll A struct A { X x; }; //dll B struct B { X x; }; Placing the serialization code for both libraries in a third io.dll means that any program using just one of A or B becomes dependent on both A and B (since io.dll must link to both A and B). And if you added a struct C { X x; }; it would be even worse.. -- Anders ----------------------------------------- "Sohail Somani" <s.somani@fincad.com> wrote in message news:1C1EBEF8DBACDC439D038EA051674EC73EE2A3@xbox.financialcad.com... Ensure that the serialization code is in one DLL by having some function like: MyClass * deserializeMyClass(std::istream & is); And call that from either dll. Then all the serialization magic is hidden (and instantiated) in one dll and you don't need to worry about cross-dll template/static/ARGH! HTH and good luck! -----Original Message----- From: boost-users-bounces@lists.boost.org on behalf of Anders Wang Kristensen Sent: Thu 7/5/2007 4:57 PM To: boost-users@lists.boost.org Subject: [Boost-users] [serialization] DLL woes Hi, I'm trying to serialize a class using two functions located in different DLLs. I can serialize fine by calling one function, but when I call the second it triggers an assertion in extended_type_info.cpp: // make sure that attempt at registration is done only once assert(lookup(eti) == m_self->m_map.end()); Apparently the class is registered twice, but how do I avoid that? -- Anders _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users