boost log link error 2019

2019-08-31 06:23发布

问题:

When I use add_file_log in my project ,it will make link error :LNK2019

unparsed outer flags:Boost::log::v2s_mt_nt5::aux::code_convert

But I run a new clear project with it (add_file_log),it will be ok.why?

My environment is windows XP + msvc9.0

And my project is linked with boost log static.

回答1:

Namespace mangling may lead to linking errors if the application is misconfigured. One common mistake is to build dynamic version of the library and not define BOOST_LOG_DYN_LINK or BOOST_ALL_DYN_LINK when building the application, so that the library assumes static linking by default. Whenever such linking errors appear, one can decode the namespace name in the missing symbols and the exported symbols of Boost.Log library and adjust library or application configuration accordingly.

see boost doc here :http://www.boost.org/doc/libs/1_55_0/libs/log/doc/html/log/rationale/namespace_mangling.html



标签: logging boost