Boost logo

Boost :

Subject: Re: [boost] [chrono] Header only library build and boost::system dependency
From: Edward Diener (eldiener_at_[hidden])
Date: 2016-05-04 06:25:03


On 5/4/2016 1:26 AM, Marc Glisse wrote:
> On Wed, 4 May 2016, Edward Diener wrote:
>
>> gcc.link
>> C:\Programming\VersionControl\modular-boost\build\boost\bin.v2\libs\cxx_dual\test\test_chrono.test\gcc-mingw-5.3\debug\test_chrono.exe
>>
>> C:\Programming\VersionControl\modular-boost\build\boost\bin.v2\libs\cxx_dual\test\test_chrono.test\gcc-mingw-5.3\debug\test_chrono.o:
>> In function `_static_initialization_and_destruction_0':
>> E:\Programming\VersionControl\modular-boost\libs\cxx_dual\test/../../../boost/system/error_code.hpp:221:
>> undefined reference to `boost::system::generic_category()'
>> E:\Programming\VersionControl\modular-boost\libs\cxx_dual\test/../../../boost/system/error_code.hpp:222:
>> undefined reference to `boost::system::generic_category()'
>> E:\Programming\VersionControl\modular-boost\libs\cxx_dual\test/../../../boost/system/error_code.hpp:223:
>> undefined reference to `boost::system::system_category()'
>> collect2.exe: error: ld returned 1 exit status
>>
>> Is there a way to use chrono without having to link boost::system ?
>
> BOOST_SYSTEM_NO_DEPRECATED ? I don't understand how this hasn't been
> made the default yet...
>

Defining BOOST_SYSTEM_NO_DEPRECATED worked in my code. Perhaps the
chrono documentation just needs to be updated to specify that
BOOST_SYSTEM_NO_DEPRECATED needs to be defined also in order not to link
boost::system.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk