Boost logo

Boost Users :

From: Hansi (hansipet_at_[hidden])
Date: 2008-08-25 06:59:36


Hello,

in my application I wrote the serialization like in the pimpl example.
With boost 1.34.1 this has worked. But now I have a few strange linker
errors.

e.g

Error 1413 error LNK2001: unresolved external symbol "protected:
__thiscall boost::archive::detail::archive_pointer_oserializer<class
boost::archive::detail::polymorphic_oarchive_route<class
boost::archive::binary_oarchive_impl<class
boost::archive::binary_oarchive,char,struct std::char_traits<char> > >
>::archive_pointer_oserializer<class
boost::archive::detail::polymorphic_oarchive_route<class
boost::archive::binary_oarchive_impl<class
boost::archive::binary_oarchive,char,struct std::char_traits<char> > >
>(class boost::serialization::extended_type_info const &)"
(??0?$archive_pointer_oserializer_at_V?$polymorphic_oarchive_route_at_V?$binary_oarchive_impl_at_Vbinary_oarchive_at_archive@boost@@DU?$char_traits_at_D@std@@@archive_at_boost@@@detail_at_archive@boost@@@detail_at_archive@boost@@$$FIAE_at_ABVextended_type_info_at_serialization@3@@Z)
main.obj

and

Error 1414 error LNK2001: unresolved external symbol "protected:
__thiscall boost::archive::detail::archive_pointer_iserializer<class
boost::archive::polymorphic_binary_iarchive>::~archive_pointer_iserializer<class
boost::archive::polymorphic_binary_iarchive>(void)"
(??1?$archive_pointer_iserializer_at_Vpolymorphic_binary_iarchive_at_archive@boost@@@detail_at_archive@boost@@$$FIAE_at_XZ)
main.obj

The problem has something to do with BOOST_CLASS_EXPORT(A) function. If
I don't include it there is not the problem with the linker error.
In the cpp file I have at the moment the instantion

template void A::serialize(boost::archive::polymorphic_iarchive &
ar,const unsigned int file_version);
template void A::serialize(boost::archive::polymorphic_oarchive &
ar,const unsigned int file_version);

and

template void A::serialize(boost::archive::binary_iarchive & ar,const
unsigned int file_version);
template void A::serialize(boost::archive::binary_oarchive & ar,const
unsigned int file_version);

What I have to do to solve that?

Best regards
Hansjörg


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net