Boost C++ Libraries: Ticket #12303: Linker error with boost.locale and operator% https://svn.boost.org/trac10/ticket/12303 <p> Hi, </p> <p> I recently updated to boost 1.61 with self-compiled libraries using MSVC2015 with the following build settings </p> <pre class="wiki">.\bootstrap .\b2 architecture=x86 toolset=msvc -j 12 --layout=tagged </pre><p> The libraries are properly compiled but when I link with my application I get the following errors: </p> <p> (BOOST_AUTO_LINK_TAGGED is defined globally) </p> <pre class="wiki">libboost_locale-mt-gd.lib(date_time.obj) : error LNK2019: unresolved external symbol "class boost::system::error_category const &amp; __cdecl boost::system::system_category(void)" (?system_category@system@boost@@YAAEBVerror_category@12@XZ) referenced in function "public: __cdecl boost::thread_exception::thread_exception(int,char const *)" (??0thread_exception@boost@@QEAA@HPEBD@Z) libboost_locale-mt-gd.lib(generator.obj) : error LNK2001: unresolved external symbol "class boost::system::error_category const &amp; __cdecl boost::system::system_category(void)" (?system_category@system@boost@@YAAEBVerror_category@12@XZ) libboost_locale-mt-gd.lib(localization_backend.obj) : error LNK2001: unresolved external symbol "class boost::system::error_category const &amp; __cdecl boost::system::system_category(void)" (?system_category@system@boost@@YAAEBVerror_category@12@XZ) libboost_locale-mt-gd.lib(lcid.obj) : error LNK2001: unresolved external symbol "class boost::system::error_category const &amp; __cdecl boost::system::system_category(void)" (?system_category@system@boost@@YAAEBVerror_category@12@XZ) libboost_locale-mt-gd.lib(date_time.obj) : error LNK2019: unresolved external symbol "class boost::system::error_category const &amp; __cdecl boost::system::generic_category(void)" (?generic_category@system@boost@@YAAEBVerror_category@12@XZ) referenced in function "void __cdecl boost::system::`dynamic initializer for 'errno_ecat''(void)" (??__Eerrno_ecat@system@boost@@YAXXZ) libboost_locale-mt-gd.lib(generator.obj) : error LNK2001: unresolved external symbol "class boost::system::error_category const &amp; __cdecl boost::system::generic_category(void)" (?generic_category@system@boost@@YAAEBVerror_category@12@XZ) libboost_locale-mt-gd.lib(localization_backend.obj) : error LNK2001: unresolved external symbol "class boost::system::error_category const &amp; __cdecl boost::system::generic_category(void)" (?generic_category@system@boost@@YAAEBVerror_category@12@XZ) libboost_locale-mt-gd.lib(lcid.obj) : error LNK2001: unresolved external symbol "class boost::system::error_category const &amp; __cdecl boost::system::generic_category(void)" (?generic_category@system@boost@@YAAEBVerror_category@12@XZ) debug\uniform_initialization.exe : fatal error LNK1120: 2 unresolved externals </pre><p> I got a minimal working example </p> <pre class="wiki">#include &lt;boost/locale.hpp&gt; int main(int argc, char *argv[]) { (boost::locale::format(boost::locale::translate("Hello, {1}")) % "World").str(); return 0; } </pre><p> The linker error occurs only if the operator% is used, format and translate alone compile and link fine. The linker error disappear as soon as I add <code>#include &lt;boost/system/error_code.hpp&gt;</code> </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/12303 Trac 1.4.3 anonymous Tue, 28 Jun 2016 08:06:47 GMT component changed; owner set https://svn.boost.org/trac10/ticket/12303#comment:1 https://svn.boost.org/trac10/ticket/12303#comment:1 <ul> <li><strong>owner</strong> set to <span class="trac-author">Artyom Beilis</span> </li> <li><strong>component</strong> <span class="trac-field-old">None</span> → <span class="trac-field-new">locale</span> </li> </ul> Ticket Artyom Beilis Thu, 13 Jul 2017 14:27:23 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/12303#comment:2 https://svn.boost.org/trac10/ticket/12303#comment:2 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">wontfix</span> </li> </ul> <p> It is dependecy problem on Windows, autolinking of not directly dependent libraries works badly </p> Ticket