Boost logo

Boost :

Subject: Re: [boost] BOOST_ASIO_SEPARATE_COMPILATION linker error
From: Niall Douglas (s_sourceforge_at_[hidden])
Date: 2015-01-14 10:23:48

On 14 Jan 2015 at 0:22, Arun.Ramasamy_at_[hidden] wrote:

> I'm trying to build boost 1.47's asio library with the BOOST_ASIO_SEPARATE_COMPILATION macro in windows 7, 32-bit, VS 2010. With this macro, the asio library can be included and built easily without building all of boost or using bjam. However, I get the following linker error:
> unresolved external symbol "class boost::system::error_category const & __cdecl boost::system::system_category(void)" (?system_category_at_system@boost@@YAABVerror_category_at_12@XZ) referenced in function "public: __thiscall boost::system::error_code::error_code(void)" (??0error_code_at_system@boost@@QAE_at_XZ)
> unresolved external symbol "class boost::system::error_category const & __cdecl boost::system::generic_category(void)" (?generic_category_at_system@boost@@YAABVerror_category_at_12@XZ) referenced in function "void __cdecl boost::system::`dynamic initializer for 'posix_category''(void)" (??__Eposix_category_at_system@boost@@YAXXZ)
> 1>
> Basically the functions boost::system::system_category and boost::system::generic_category aren't defined anywhere. I can't find the implementation of these functions in boost source when I tried grepping it.

If you want an ASIO totally standalone from Boost, use the standalone
ASIO distribution available from which requires C++ 11. Or
indeed just pull it from the ASIO git repository.

Otherwise yes, standalone ASIO does require Boost to substitute for
the C++ 11 STL features it uses, which include system_category and
others. You may find using a much newer Boost and if you turn on C++
11 you may get BOOST_ASIO_SEPARATE_COMPILATION to not require Boost.


ned Productions Limited Consulting

Boost list run by bdawes at, gregod at, cpdaniel at, john at