
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi Anders,
I had exactly the same problem three days ago. I have found no way to
prevent the compiler from instantiating some templates with
serialization code in multiple DLLs. My solution was to switch from
intrusive to non intrusive serialization and putting all serialization
binaries in a third DLL.
How it works (for me):
1. Rename all
template <class Archive>
void serialize(Archive& ar, const unsigned int version) { ... }
to
template <class Archive>
void my_serialize(Archive& ar, const unsigned int version) { ... }
and make it public.
2. Remove all serialization headers and macros from the existing code.
3. Create a new DLL.
4. For every serializable class I have there a .cpp file which looks like:
#include
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
- -- Software Consulting Markus Bernhardt GmbH Spieljochstr. 34 81825 München Fon: +49-89-420903-14 Fax: +49-89-420903-20 www: http://www.scmb.de Geschäftsführung Markus Bernhardt Handelsregister AG München HRB 125966 USt-Id DE201885231 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.2 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGjcNOdnooMonJSYkRAkt5AKCDwPC6miTv4LvKS1R17yPhnxqLxACdHc2H ZgxzA+Uw6G9pkfTdKAsDNfc= =Usz+ -----END PGP SIGNATURE-----