Boost logo

Boost Users :

Subject: [Boost-users] [serialization] linker errors then building minimal application on WinXP 64
From: pheres (ph3res_at_[hidden])
Date: 2010-04-13 08:18:34


Hello,

the following stripped down code builds fine under 32bit platform but
fails with lot of linker errors on the 64bit platform. Compiler is VS2005.
I diagnosed the link procedure and found that my 64bit version of
libboost_serialization-vc80-mt-1_42.lib is found and tried to link
Does anybody know what I am doing wrong?

Thank you in advance!

--------------------------------------------
#include <boost/archive/xml_oarchive.hpp>
#include <fstream>
#include "boost/serialization/vector.hpp"
#include "boost/serialization/set.hpp"
#include "boost/serialization/utility.hpp"

struct A_STRUCT
{
     double mBlub;

     int saveXMLConfig() const
     {
         std::ofstream ofs("file", std::ios::binary);
         boost::archive::xml_oarchive oa(ofs);
         oa << boost::serialization::make_nvp("A_STRUCT", *this);
         return 0;
     }

     void save(boost::archive::xml_oarchive& ar, const unsigned int) const
     {
         ar & boost::serialization::make_nvp("mBlub", mBlub);
     }

     BOOST_SERIALIZATION_SPLIT_MEMBER()
};

int main(){}
--------------------------------------------

The build output:

--------------------------------------------

1>------ Build started: Project: test, Configuration: Debug x64 ------
1>Compiling...
1>main.cpp
1>Linking to lib file: libboost_serialization-vc80-mt-gd-1_42.lib
1>Linking to lib file: libboost_serialization-vc80-mt-gd-1_42.lib
1>Linking to lib file: libboost_serialization-vc80-mt-gd-1_42.lib
1>Linking...
1> Creating library D:\Simulation\test\test\x64\Debug\test.lib and
object D:\Simulation\test\test\x64\Debug\test.exp
1>main.obj : error LNK2019: unresolved external symbol "protected:
__cdecl
boost::archive::detail::basic_oserializer::basic_oserializer(class
boost::serialization::extended_type_info const &)"
(??0basic_oserializer_at_detail@archive_at_boost@@IEAA_at_AEBVextended_type_info_at_serialization@3@@Z)
referenced in function "public: __cdecl
boost::archive::detail::oserializer<class
boost::archive::xml_oarchive,struct A_STRUCT>::oserializer<class
boost::archive::xml_oarchive,struct A_STRUCT>(void)"
(??0?$oserializer_at_Vxml_oarchive_at_archive@boost@@UA_STRUCT@@@detail_at_archive@boost@@QEAA_at_XZ)
1>main.obj : error LNK2019: unresolved external symbol "protected:
__cdecl
boost::archive::detail::basic_oserializer::~basic_oserializer(void)"
(??1basic_oserializer_at_detail@archive_at_boost@@IEAA_at_XZ) referenced in
function "public: virtual __cdecl
boost::archive::detail::oserializer<class
boost::archive::xml_oarchive,struct A_STRUCT>::~oserializer<class
boost::archive::xml_oarchive,struct A_STRUCT>(void)"
(??1?$oserializer_at_Vxml_oarchive_at_archive@boost@@UA_STRUCT@@@detail_at_archive@boost@@UEAA_at_XZ)
1>main.obj : error LNK2001: unresolved external symbol "public: virtual
bool __cdecl
boost::serialization::typeid_system::extended_type_info_typeid_0::is_less_than(class
boost::serialization::extended_type_info const &)const "
(?is_less_than_at_extended_type_info_typeid_0_at_typeid_system_at_serialization@boost@@UEBA_NAEBVextended_type_info_at_34@@Z)
1>main.obj : error LNK2001: unresolved external symbol "public: virtual
bool __cdecl
boost::serialization::typeid_system::extended_type_info_typeid_0::is_equal(class
boost::serialization::extended_type_info const &)const "
(?is_equal_at_extended_type_info_typeid_0_at_typeid_system_at_serialization@boost@@UEBA_NAEBVextended_type_info_at_34@@Z)
1>main.obj : error LNK2019: unresolved external symbol "protected:
__cdecl
boost::serialization::typeid_system::extended_type_info_typeid_0::~extended_type_info_typeid_0(void)"
(??1extended_type_info_typeid_0_at_typeid_system_at_serialization@boost@@IEAA_at_XZ)
referenced in function "int `public: __cdecl
boost::serialization::extended_type_info_typeid<struct
A_STRUCT>::extended_type_info_typeid<struct
A_STRUCT>(void)'::`1'::dtor$0"
(?dtor$0@?0???0?$extended_type_info_typeid_at_UA_STRUCT@@@serialization_at_boost@@QEAA_at_XZ@4HA)
1>main.obj : error LNK2019: unresolved external symbol "protected: void
__cdecl
boost::serialization::extended_type_info::key_register(void)const "
(?key_register_at_extended_type_info_at_serialization@boost@@IEBAXXZ)
referenced in function "public: __cdecl
boost::serialization::extended_type_info_typeid<struct
A_STRUCT>::extended_type_info_typeid<struct A_STRUCT>(void)"
(??0?$extended_type_info_typeid_at_UA_STRUCT@@@serialization_at_boost@@QEAA_at_XZ)
1>main.obj : error LNK2019: unresolved external symbol "protected: void
__cdecl
boost::serialization::typeid_system::extended_type_info_typeid_0::type_register(class
type_info const &)"
(?type_register_at_extended_type_info_typeid_0_at_typeid_system_at_serialization@boost@@IEAAXAEBVtype_info@@@Z)
referenced in function "public: __cdecl
boost::serialization::extended_type_info_typeid<struct
A_STRUCT>::extended_type_info_typeid<struct A_STRUCT>(void)"
(??0?$extended_type_info_typeid_at_UA_STRUCT@@@serialization_at_boost@@QEAA_at_XZ)
1>main.obj : error LNK2019: unresolved external symbol "protected:
__cdecl
boost::serialization::typeid_system::extended_type_info_typeid_0::extended_type_info_typeid_0(char
const *)"
(??0extended_type_info_typeid_0_at_typeid_system_at_serialization@boost@@IEAA_at_PEBD@Z)
referenced in function "public: __cdecl
boost::serialization::extended_type_info_typeid<struct
A_STRUCT>::extended_type_info_typeid<struct A_STRUCT>(void)"
(??0?$extended_type_info_typeid_at_UA_STRUCT@@@serialization_at_boost@@QEAA_at_XZ)
1>main.obj : error LNK2019: unresolved external symbol "protected: void
__cdecl boost::archive::basic_xml_oarchive<class
boost::archive::xml_oarchive>::save_end(char const *)"
(?save_end@?$basic_xml_oarchive_at_Vxml_oarchive_at_archive@boost@@@archive_at_boost@@IEAAXPEBD_at_Z)
referenced in function "protected: void __cdecl
boost::archive::basic_xml_oarchive<class
boost::archive::xml_oarchive>::save_override<double const >(struct
boost::serialization::nvp<double const > const &,int)"
(??$save_override@$$CBN@?$basic_xml_oarchive_at_Vxml_oarchive_at_archive@boost@@@archive_at_boost@@IEAAXAEBU?$nvp@$$CBN_at_serialization@2_at_H@Z)
1>main.obj : error LNK2019: unresolved external symbol "protected: void
__cdecl boost::archive::basic_xml_oarchive<class
boost::archive::xml_oarchive>::save_start(char const *)"
(?save_start@?$basic_xml_oarchive_at_Vxml_oarchive_at_archive@boost@@@archive_at_boost@@IEAAXPEBD_at_Z)
referenced in function "protected: void __cdecl
boost::archive::basic_xml_oarchive<class
boost::archive::xml_oarchive>::save_override<double const >(struct
boost::serialization::nvp<double const > const &,int)"
(??$save_override@$$CBN@?$basic_xml_oarchive_at_Vxml_oarchive_at_archive@boost@@@archive_at_boost@@IEAAXAEBU?$nvp@$$CBN_at_serialization@2_at_H@Z)
1>main.obj : error LNK2019: unresolved external symbol "protected: void
__cdecl boost::archive::basic_xml_oarchive<class
boost::archive::xml_oarchive>::end_preamble(void)"
(?end_preamble@?$basic_xml_oarchive_at_Vxml_oarchive_at_archive@boost@@@archive_at_boost@@IEAAXXZ)
referenced in function "public: static void __cdecl
boost::archive::save_access::save_primitive<class
boost::archive::xml_oarchive,double>(class boost::archive::xml_oarchive
&,double const &)"
(??$save_primitive_at_Vxml_oarchive_at_archive@boost@@N_at_save_access_at_archive@boost@@SAXAEAVxml_oarchive_at_12@AEBN_at_Z)
1>main.obj : error LNK2019: unresolved external symbol "public: __cdecl
boost::archive::archive_exception::archive_exception(enum
boost::archive::archive_exception::_exception_code,char const *,char
const *)"
(??0archive_exception_at_archive@boost@@QEAA_at_W4_exception_code_at_012@PEBD1_at_Z)
referenced in function "public: void __cdecl
boost::archive::basic_text_oprimitive<class
std::basic_ostream<char,struct std::char_traits<char> > >::save(double)"
(?save@?$basic_text_oprimitive_at_V?$basic_ostream_at_DU?$char_traits_at_D@std@@@std@@@archive_at_boost@@QEAAXN_at_Z)
1>main.obj : error LNK2019: unresolved external symbol "public: virtual
__cdecl boost::archive::archive_exception::~archive_exception(void)"
(??1archive_exception_at_archive@boost@@UEAA_at_XZ) referenced in function
"public: void __cdecl boost::archive::archive_exception::`vbase
destructor'(void)" (??_Darchive_exception_at_archive@boost@@QEAAXXZ)
1>main.obj : error LNK2019: unresolved external symbol "public: virtual
char const * __cdecl boost::archive::archive_exception::what(void)const
" (?what_at_archive_exception_at_archive@boost@@UEBAPEBDXZ) referenced in
function "[thunk]:public: virtual char const * __cdecl
boost::archive::archive_exception::what`vtordisp{4294967292,0}'
(void)const "
(?what_at_archive_exception_at_archive@boost@@$4PPPPPPPM_at_A@EBAPEBDXZ)
1>main.obj : error LNK2019: unresolved external symbol "protected: void
__cdecl
boost::serialization::typeid_system::extended_type_info_typeid_0::type_unregister(void)"
(?type_unregister_at_extended_type_info_typeid_0_at_typeid_system_at_serialization@boost@@IEAAXXZ)
referenced in function "public: __cdecl
boost::serialization::extended_type_info_typeid<struct
A_STRUCT>::~extended_type_info_typeid<struct A_STRUCT>(void)"
(??1?$extended_type_info_typeid_at_UA_STRUCT@@@serialization_at_boost@@QEAA_at_XZ)
1>main.obj : error LNK2019: unresolved external symbol "protected: void
__cdecl
boost::serialization::extended_type_info::key_unregister(void)const "
(?key_unregister_at_extended_type_info_at_serialization@boost@@IEBAXXZ)
referenced in function "public: __cdecl
boost::serialization::extended_type_info_typeid<struct
A_STRUCT>::~extended_type_info_typeid<struct A_STRUCT>(void)"
(??1?$extended_type_info_typeid_at_UA_STRUCT@@@serialization_at_boost@@QEAA_at_XZ)
1>D:\Simulation\test\test\x64\Debug\test.exe : fatal error LNK1120: 16
unresolved externals
1>Build log was saved at
"file://d:\Simulation\test\test\test\x64\Debug\BuildLog.htm"
1>test - 17 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

--------------------------------------------


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