Boost logo

Boost Users :

Subject: [Boost-users] Linking problems with boost serialization and MinGW
From: Florian Burkart (florian.burkart_at_[hidden])
Date: 2012-10-31 12:33:44


Hi,

I am having a bit of trouble linking to boost serialization with MinGW.

If I don't include -lboost_serialization-mgw46-mt-d-1_50 I get loads of
undefined references, however, if I do include it, most disappear but I
still get some, namely I get

RDebug/libFlamLib.a(Common_Collector.o): In function
`ZN5boost7archive21basic_text_oprimitiveISoE4saveINS0_14object_id_typeEEEvRKT_':
/Sys/boost/MinGW32/boost_1_50_0/include/boost-1_50/boost/archive/basic_text_oprimitive.hpp:89:
undefined reference to
`boost::archive::archive_exception::archive_exception(boost::archive::archive_exception::exception_code,
char const*, char const*)'
RDebug/libFlamLib.a(Common_Collector.o): In function
`ZN5boost7archive21basic_text_oprimitiveISoE4saveINS0_21object_reference_typeEEEvRKT_':
/Sys/boost/MinGW32/boost_1_50_0/include/boost-1_50/boost/archive/basic_text_oprimitive.hpp:89:
undefined reference to
`boost::archive::archive_exception::archive_exception(boost::archive::archive_exception::exception_code,
char const*, char const*)'
RDebug/libFlamLib.a(Common_Collector.o): In function
`ZN5boost7archive21basic_text_oprimitiveISoE4saveINS0_13class_id_typeEEEvRKT_':
/Sys/boost/MinGW32/boost_1_50_0/include/boost-1_50/boost/archive/basic_text_oprimitive.hpp:89:
undefined reference to
`boost::archive::archive_exception::archive_exception(boost::archive::archive_exception::exception_code,
char const*, char const*)'
RDebug/libFlamLib.a(Common_Collector.o): In function
`ZN5boost7archive21basic_text_oprimitiveISoE4saveINS0_23class_id_reference_typeEEEvRKT_':
/Sys/boost/MinGW32/boost_1_50_0/include/boost-1_50/boost/archive/basic_text_oprimitive.hpp:89:
undefined reference to
`boost::archive::archive_exception::archive_exception(boost::archive::archive_exception::exception_code,
char const*, char const*)'
RDebug/libFlamLib.a(Common_Collector.o): In function
`ZN5boost7archive21basic_text_oprimitiveISoE4saveINS0_13tracking_typeEEEvRKT_':
/Sys/boost/MinGW32/boost_1_50_0/include/boost-1_50/boost/archive/basic_text_oprimitive.hpp:89:
undefined reference to
`boost::archive::archive_exception::archive_exception(boost::archive::archive_exception::exception_code,
char const*, char const*)'
RDebug/libFlamLib.a(Common_Collector.o):/Sys/boost/MinGW32/boost_1_50_0/include/boost-1_50/boost/archive/basic_text_oprimitive.hpp:89:
more undefined references to
`boost::archive::archive_exception::archive_exception(boost::archive::archive_exception::exception_code,
char const*, char const*)' follow

Basically they all refer to
"`boost::archive::archive_exception::archive_exception".

boost serialization built fine with .\b2.exe
--prefix=c:\Sys\boost\MinGW32\boost_1_50_0 toolset=gcc address-model=32
--with-serialization install

The same code compiles and links just fine with gcc on linux and MSVC on
windows.

I haven't isolate the issue yet, so am afraid can't give
a reproducible sample, but any ideas so far? Maybe look familiar?

Thanks,
Florian



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