尝试构建Boost.Log示例时发生链接错误
Linking error while trying to build Boost.Log example
我已经成功地在Windows 7上为VS 2010构建了Boost.Log库。当我尝试运行最简单的例子时,我的程序找不到Boost.System和Boost.Filesystem的符号,我得到了"未定义的外部符号"错误。我已经通过手动将libboost_filesystem-vc100-mt-gd-1_48.lib
和libboost_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构建。我已经正确地重建了它,现在它工作得很好。
相关文章:
- 静态数据成员的问题-修复链接错误会导致编译器错误
- Visual Studio mkl_link_tool.exe链接错误
- C++ 实现模板单例类时出现链接错误
- 使用类模板的方法链接错误
- MySQL C++连接器链接错误
- VS 2015 链接错误 无法构建依赖于 libcurl 的项目
- 运行 C++ 单元测试时LNK2005链接错误
- 对 CMake 中'cudaRegisterLinkedBinary'链接错误的未定义引用?
- 链接错误,包括我创建的相同头文件 - C++
- 在Embarcadero C++ Builder中生成的DLL未解决的外部链接错误
- 使用标头保护的多个定义链接错误
- 链接错误:未定义对 stdscr 和 wgetch 的引用
- 使用 Vivek 的 Vcam / 捕获源过滤器构建/链接错误
- 升压program_options中的链接错误
- 使用 g++ 预处理器进行替换会导致链接错误
- 在调试配置中编译工作正常,但发布会给出链接错误
- 相邻矩阵设置链接错误
- 包含常量变量并包含在多个文件中的标头的链接错误
- C++链接错误,我理解但无法解决
- 是什么导致macOS Mojave上的GoogleTest链接错误