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
#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@detail@archive@boost@@IEAA@AEBVextended_type_info@serialization@3@@Z)
referenced in function "public: __cdecl
boost::archive::detail::oserializer::oserializer(void)"
(??0?$oserializer@Vxml_oarchive@archive@boost@@UA_STRUCT@@@detail@archive@boost@@QEAA@XZ)
1>main.obj : error LNK2019: unresolved external symbol "protected:
__cdecl
boost::archive::detail::basic_oserializer::~basic_oserializer(void)"
(??1basic_oserializer@detail@archive@boost@@IEAA@XZ) referenced in
function "public: virtual __cdecl
boost::archive::detail::oserializer::~oserializer(void)"
(??1?$oserializer@Vxml_oarchive@archive@boost@@UA_STRUCT@@@detail@archive@boost@@UEAA@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@extended_type_info_typeid_0@typeid_system@serialization@boost@@UEBA_NAEBVextended_type_info@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@extended_type_info_typeid_0@typeid_system@serialization@boost@@UEBA_NAEBVextended_type_info@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@typeid_system@serialization@boost@@IEAA@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@UA_STRUCT@@@serialization@boost@@QEAA@XZ@4HA)
1>main.obj : error LNK2019: unresolved external symbol "protected: void
__cdecl
boost::serialization::extended_type_info::key_register(void)const "
(?key_register@extended_type_info@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@UA_STRUCT@@@serialization@boost@@QEAA@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@extended_type_info_typeid_0@typeid_system@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@UA_STRUCT@@@serialization@boost@@QEAA@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@typeid_system@serialization@boost@@IEAA@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@UA_STRUCT@@@serialization@boost@@QEAA@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@Vxml_oarchive@archive@boost@@@archive@boost@@IEAAXPEBD@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@Vxml_oarchive@archive@boost@@@archive@boost@@IEAAXAEBU?$nvp@$$CBN@serialization@2@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@Vxml_oarchive@archive@boost@@@archive@boost@@IEAAXPEBD@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@Vxml_oarchive@archive@boost@@@archive@boost@@IEAAXAEBU?$nvp@$$CBN@serialization@2@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@Vxml_oarchive@archive@boost@@@archive@boost@@IEAAXXZ)
referenced in function "public: static void __cdecl
boost::archive::save_access::save_primitive(class boost::archive::xml_oarchive
&,double const &)"
(??$save_primitive@Vxml_oarchive@archive@boost@@N@save_access@archive@boost@@SAXAEAVxml_oarchive@12@AEBN@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@archive@boost@@QEAA@W4_exception_code@012@PEBD1@Z)
referenced in function "public: void __cdecl
boost::archive::basic_text_oprimitive >::save(double)"
(?save@?$basic_text_oprimitive@V?$basic_ostream@DU?$char_traits@D@std@@@std@@@archive@boost@@QEAAXN@Z)
1>main.obj : error LNK2019: unresolved external symbol "public: virtual
__cdecl boost::archive::archive_exception::~archive_exception(void)"
(??1archive_exception@archive@boost@@UEAA@XZ) referenced in function
"public: void __cdecl boost::archive::archive_exception::`vbase
destructor'(void)" (??_Darchive_exception@archive@boost@@QEAAXXZ)
1>main.obj : error LNK2019: unresolved external symbol "public: virtual
char const * __cdecl boost::archive::archive_exception::what(void)const
" (?what@archive_exception@archive@boost@@UEBAPEBDXZ) referenced in
function "[thunk]:public: virtual char const * __cdecl
boost::archive::archive_exception::what`vtordisp{4294967292,0}'
(void)const "
(?what@archive_exception@archive@boost@@$4PPPPPPPM@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@extended_type_info_typeid_0@typeid_system@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@UA_STRUCT@@@serialization@boost@@QEAA@XZ)
1>main.obj : error LNK2019: unresolved external symbol "protected: void
__cdecl
boost::serialization::extended_type_info::key_unregister(void)const "
(?key_unregister@extended_type_info@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@UA_STRUCT@@@serialization@boost@@QEAA@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 ==========
--------------------------------------------