[Boost-users] [serialization] usage of polymorphic archives generate linker errors

1 view
Skip to first unread message

Christoph Heindl

unread,
Nov 24, 2009, 8:27:45 AM11/24/09
to boost...@lists.boost.org
Hi everyone,

the attached example [1] generates a couple of linker [2] errors on
msvc 9.0 / boost 1.40.0 all related to missing archive_serializer_map
symbols.

when switching from polymorphic archives to corresponding
non-polymorphic archives the attached example runs fine.

It seems that the usage of BOOST_CLASS_EXPORT in conjunction with
polymorphic archives triggers the linker error.

I tried to add explicit template instantiations, such as [3], for the
missing types to boost archive, recompiled boost and was able to get
rid of the linker error. The problem then, however, is that the
example fails at runtime with an assertion that a type-lookup did not
succeed. So I guess adding the explicit template instantiations was
not the correct approach.

Any ideas?

Best regards,
Christoph

[1] example_boost_class_export.cpp
[2] linker_errors.txt
[3] polymorphic_xml_iarchive.cpp

linker_errors.txt
example_boost_class_export.cpp
polymorphic_xml_iarchive.cpp

Christoph Heindl

unread,
Nov 24, 2009, 10:33:41 AM11/24/09
to boost...@lists.boost.org
Hi again,

I just found out that the example attached to my previous post was
incorrect in the way that it used non-polymorphic xml archives (which
do work). please find attached the corrected (non-linkable) example.

Best regards,
Christoph

example_boost_class_export.cpp
Reply all
Reply to author
Forward
0 new messages