|
Boost Users : |
From: picca_at_[hidden]
Date: 2006-06-19 03:11:08
Hello
My post is closely related to this one.
http://lists.boost.org/boost-users/2004/12/8768.php
I am trying to build a library.
so I put a serialize template in most of my classes.
I have no problem to create the static library.
Now I have a test suit for my library. if I build it with the the serialization test.
diffractometer::twoC::Vertical d_ref, d;
stringstream flux;
diffractometer::twoC::Vertical const & work_around = d_ref;
boost::archive::text_oarchive oa(flux);
oa << work_around;
boost::archive::text_iarchive ia(flux);
ia >> d;
Everything is ok
but when I comment the oa << work_around and the the ia >> d
The compilation fail
with tone of error like this:
debug/linux2/src/libhkl.a(affinement_simplex.o): In function `boost::archive::detail::load_non_pointer_type<boost::archive::text_iarchive, hkl::affinement::Simplex>::load_standard::invoke(boost::archive::text_iarchive&, hkl::affinement::Simplex&)':
/usr/include/boost/archive/detail/iserializer.hpp:375: undefined reference to `boost::archive::detail::basic_iarchive::load_object(void*, boost::archive::detail::basic_iserializer const&)'
debug/linux2/src/libhkl.a(affinement_simplex.o): In function `boost::archive::detail::pointer_iserializer<hkl::affinement::Simplex, boost::archive::text_iarchive>::load_object_ptr(boost::archive::detail::basic_iarchive&, void*&, unsigned int) const':
/usr/include/boost/archive/detail/iserializer.hpp:309: undefined reference to `boost::archive::detail::basic_iarchive::next_object_pointer(void*)'
debug/linux2/src/libhkl.a(affinement_simplex.o): In function `~void_caster_primitive':
/usr/include/boost/serialization/void_cast.hpp:132: undefined reference to `boost::serialization::void_cast_detail::void_caster::~void_caster()'
/usr/include/boost/serialization/void_cast.hpp:132: undefined reference to `boost::serialization::void_cast_detail::void_caster::~void_caster()'
debug/linux2/src/libhkl.a(geometry_kappa.o): In function `boost::serialization::detail::extended_type_info_typeid_1<hkl::geometry::Kappa const>::export_register(char const*)':
/usr/include/boost/serialization/extended_type_info_typeid.hpp:101: undefined reference to `boost::serialization::extended_type_info::key_register(char const*)'
debug/linux2/src/libhkl.a(geometry_kappa.o): In function `pointer_oserializer':
/usr/include/boost/archive/detail/oserializer.hpp:226: undefined reference to `boost::archive::detail::archive_pointer_oserializer<boost::archive::text_oarchive>::archive_pointer_oserializer(boost::serialization::extended_type_info const&)'
/usr/include/boost/archive/detail/oserializer.hpp:236: undefined reference to `boost::archive::detail::archive_pointer_oserializer<boost::archive::text_oarchive>::~archive_pointer_oserializer()'
/usr/include/boost/archive/detail/oserializer.hpp:226: undefined reference to `boost::archive::detail::archive_pointer_oserializer<boost::archive::text_oarchive>::archive_pointer_oserializer(boost::serialization::extended_type_info const&)'
/usr/include/boost/archive/detail/oserializer.hpp:236: undefined reference to `boost::archive::detail::archive_pointer_oserializer<boost::archive::text_oarchive>::~archive_pointer_oserializer()'
debug/linux2/src/libhkl.a(geometry_kappa.o): In function `pointer_iserializer':
/usr/include/boost/archive/detail/iserializer.hpp:332: undefined reference to `boost::archive::detail::archive_pointer_iserializer<boost::archive::text_iarchive>::archive_pointer_iserializer(boost::serialization::extended_type_info const&)'
/usr/include/boost/archive/detail/iserializer.hpp:341: undefined reference to `boost::archive::detail::archive_pointer_iserializer<boost::archive::text_iarchive>::~archive_pointer_iserializer()'
/usr/include/boost/archive/detail/iserializer.hpp:332: undefined reference to `boost::archive::detail::archive_pointer_iserializer<boost::archive::text_iarchive>::archive_pointer_iserializer(boost::serialization::extended_type_info const&)'
/usr/include/boost/archive/detail/iserializer.hpp:341: undefined reference to `boost::archive::detail::archive_pointer_iserializer<boost::archive::text_iarchive>::~archive_pointer_iserializer()'
debug/linux2/src/libhkl.a(geometry_kappa.o): In function `~pointer_oserializer':
/usr/include/boost/archive/detail/oserializer.hpp:184: undefined reference to `boost::archive::detail::archive_pointer_oserializer<boost::archive::text_oarchive>::~archive_pointer_oserializer()'
debug/linux2/src/libhkl.a(geometry_kappa.o): In function `~pointer_iserializer':
/usr/include/boost/archive/detail/iserializer.hpp:197: undefined reference to `boost::archive::detail::archive_pointer_iserializer<boost::archive::text_iarchive>::~archive_pointer_iserializer()'
/usr/include/boost/archive/detail/iserializer.hpp:197: undefined reference to `boost::archive::detail::archive_pointer_iserializer<boost::archive::text_iarchive>::~archive_pointer_iserializer()'
debug/linux2/src/libhkl.a(geometry_kappa.o): In function `~pointer_oserializer':
/usr/include/boost/archive/detail/oserializer.hpp:184: undefined reference to `boost::archive::detail::archive_pointer_oserializer<boost::archive::text_oarchive>::~archive_pointer_oserializer()'
debug/linux2/src/libhkl.a(geometry_kappa.o): In function `boost::archive::detail::pointer_iserializer<hkl::geometry::Kappa, boost::archive::text_iarchive>::load_object_ptr(boost::archive::detail::basic_iarchive&, void*&, unsigned int) const':
/usr/include/boost/archive/detail/iserializer.hpp:309: undefined reference to `boost::archive::detail::basic_iarchive::next_object_pointer(void*)'
collect2: ld returned 1 exit status
So the question is how can I avoid all this ?
Have a nice day.
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