提升日志链接错误2019 [英] boost log link error 2019

查看:164
本文介绍了提升日志链接错误2019的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我在项目中使用add_file_log时,将导致链接错误:LNK2019

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

未分析的外部标志:Boost :: log :: v2s_mt_nt5 :: aux :: code_convert

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

但是我用它运行一个新的清除项目(add_file_log),一切正常.为什么?

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

我的环境是Windows XP + msvc9.0

My environment is windows XP + msvc9.0

我的项目与boost log static链接.

And my project is linked with boost log static.

推荐答案

如果应用程序配置不正确,

名称空间处理可能会导致链接错误.一个常见的错误是构建该库的动态版本,并且在构建应用程序时未定义BOOST_LOG_DYN_LINK或BOOST_ALL_DYN_LINK,因此该库默认情况下采用静态链接.每当出现此类链接错误时,就可以解码Boost.Log库中缺少的符号和导出的符号中的名称空间名称,并相应地调整库或应用程序配置.

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.

在此处查看增强文档: http://www.boost.org/doc/libs/1_55_0/libs/log/doc/html/log/rationale/namespace_mangling.html

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

这篇关于提升日志链接错误2019的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆