[boost] [log] Link error with trivial logging
Hi, I just built boost 1.43 with the latest version of boost-log included (from boost-log.sourceforge.net). I'm currently using the static, multi-threaded debug libraries from the build: libboost_log-vc80-mt-sgd-1_43.lib At the end of this e-mail you can see the main() from my win32 console application. However, I'm receiving many link errors like the following: libboost_log-vc80-mt-sgd-1_43.lib(trivial.obj) : error LNK2019: unresolved external symbol "class boost::system::error_category const & __cdecl boost::system::get_system_category(void)" (?get_system_category@system@boost@@YAABVerror_category@12@XZ) referenced in function "void __cdecl boost::system::`dynamic initializer for 'system_category''(void)" (??__Esystem_category@system@boost@@YAXXZ) Any thoughts on what might be causing this? Below is my main(). Thanks! ------------------ #include <boost/log/trivial.hpp> // For "trivial" logging API #include <iostream> #include <string> void main(int argc, char* argv[]) { BOOST_LOG_TRIVIAL(trace) << "A trace severity message"; BOOST_LOG_TRIVIAL(debug) << "A debug severity message"; BOOST_LOG_TRIVIAL(info) << "An informational severity message"; BOOST_LOG_TRIVIAL(warning) << "A warning severity message"; BOOST_LOG_TRIVIAL(error) << "An error severity message"; BOOST_LOG_TRIVIAL(fatal) << "A fatal severity message"; // keep cmd window open std::cout << "press a key..."; std::string whateva; std::cin >> whateva; } ------------------
libboost_log-vc80-mt-sgd-1_43.lib(trivial.obj) : error LNK2019: unresolved external symbol "class boost::system::error_category const & __cdecl boost::system::get_system_category(void)" (?get_system_category@system@boost@@YAABVerror_category@12@XZ) referenced in function "void __cdecl boost::system::`dynamic initializer for 'system_category''(void)" (??__Esystem_category@system@boost@@YAXXZ)
Any thoughts on what might be causing this? Below is my main(). Thanks!
Do you have libboost_system-vc80-mt-sgd-1_43.lib ? This lib should be linked as well.
-----Original Message----- From: boost-users-bounces@lists.boost.org [mailto:boost-users- bounces@lists.boost.org] On Behalf Of Igor R Sent: Wednesday, June 16, 2010 3:56 AM To: boost-users@lists.boost.org Subject: Re: [Boost-users] [boost] [log] Link error with trivial logging
libboost_log-vc80-mt-sgd-1_43.lib(trivial.obj) : error LNK2019: unresolved external symbol "class boost::system::error_category const & __cdecl boost::system::get_system_category(void)" (?get_system_category@system@boost@@YAABVerror_category@12@XZ) referenced in function "void __cdecl boost::system::`dynamic initializer for 'system_category''(void)" (??__Esystem_category@system@boost@@YAXXZ)
Any thoughts on what might be causing this? Below is my main(). Thanks!
Do you have libboost_system-vc80-mt-sgd-1_43.lib ? This lib should be linked as well. _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
I am using msvc90 with boost 1.43 and receive the same linking errors when compiling a simple trivial console project. I can get the project to link successfully if I include a backend sink, i.e.: #include <boost/log/sinks/text_file_backend.hpp> This bug can be verified by declaring #define BOOST_LIB_DIAGNOSTIC and watching which libs get pulled in for linking when including or commenting out text_file_backend.hpp. Roger S.
participants (3)
-
Igor R
-
Joey Mink
-
Roger Stewart