繁体   English   中英

尝试构建Boost.Log示例时链接错误

[英]Linking error while trying to build Boost.Log example

我已经在VS 2010的Windows 7上成功构建了Boost.Log库。当我尝试运行最简单的示例时,我的程序找不到Boost.System和Boost.Filesystem的符号,并且出现了“未定义的外部符号”错误。 我已经通过在项目中手动包含libboost_filesystem-vc100-mt-gd-1_48.liblibboost_system-vc100-mt-gd-1_48.lib来解决该问题。

尽管如此,现在我还有另一个问题:尝试为Boost.Log构建“ basic_usage”示例时,出现错误

error LNK2019: unresolved external symbol "private: void __thiscall boost::log_mt_nt5::sinks::basic_text_file_backend<char>::construct(class boost::filesystem3::path const &,int,unsigned __int64,class boost::function0<bool> const &,bool)"

我怎么解决这个问题?

我找到了解决方案!

原因是我用Boost.Filesystem v2构建了Boost.Log,而我原本应该使用v3构建它。 我已经正确地重建了它,现在它可以完美地工作了。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM