Linking errors

Feb 26, 2015 at 3:21 PM
Any idea why I'm getting these linking errors?

2>libboost_locale-vc120-mt-gd-1_57.lib(generator.obj) : error LNK2019: unresolved external symbol "class boost::system::error_category const & __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) 2>libboost_locale-vc120-mt-gd-1_57.lib(localization_backend.obj) : error LNK2001: unresolved external symbol "class boost::system::error_category const & __cdecl boost::system::system_category(void)" (?system_category@system@boost@@YAAEBVerror_category@12@XZ) 2>libboost_locale-vc120-mt-gd-1_57.lib(lcid.obj) : error LNK2001: unresolved external symbol "class boost::system::error_category const & __cdecl boost::system::system_category(void)" (?system_category@system@boost@@YAAEBVerror_category@12@XZ) 2>libboost_locale-vc120-mt-gd-1_57.lib(date_time.obj) : error LNK2001: unresolved external symbol "class boost::system::error_category const & __cdecl boost::system::system_category(void)" (?system_category@system@boost@@YAAEBVerror_category@12@XZ) 2>libboost_locale-vc120-mt-gd-1_57.lib(generator.obj) : error LNK2019: unresolved external symbol "class boost::system::error_category const & __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) 2>libboost_locale-vc120-mt-gd-1_57.lib(localization_backend.obj) : error LNK2001: unresolved external symbol "class boost::system::error_category const & __cdecl boost::system::generic_category(void)" (?generic_category@system@boost@@YAAEBVerror_category@12@XZ) 2>libboost_locale-vc120-mt-gd-1_57.lib(lcid.obj) : error LNK2001: unresolved external symbol "class boost::system::error_category const & __cdecl boost::system::generic_category(void)" (?generic_category@system@boost@@YAAEBVerror_category@12@XZ) 2>libboost_locale-vc120-mt-gd-1_57.lib(date_time.obj) : error LNK2001: unresolved external symbol "class boost::system::error_category const & __cdecl boost::system::generic_category(void)" (?generic_category@system@boost@@YAAEBVerror_category@12@XZ)
Mar 1, 2015 at 12:13 PM
Edited Mar 1, 2015 at 12:14 PM
Nevermind,
Turns out that boost::locale includes boost::system::system_category but doesn't include it in the headers so auto link wasn't automatically telling the linker to link to boost::system. Once I explicitly included boost/system/system_error.hpp, everything auto linked fine.
Marked as answer by Philippecp on 3/1/2015 at 5:13 AM