fatal error LNK1104: cannot open file #39;libboost_system-vc110-mt-gd-1_51.lib#39;(致命错误 LNK1104:无法打开文件“libboost_system-vc110-mt-gd-1_51.lib)
问题描述
似乎我无法让它发挥作用.我制作了一个简单的控制台应用程序(它依赖于 websocket++
库),它需要 Boost
库......但是当我尝试编译时,我得到:
Seem I can't get this to work. I made a simple console application (which depend on websocket++
library) which need Boost
libraries.. but when I try to compile I get:
致命错误 LNK1104:无法打开文件libboost_system-vc110-mt-gd-1_51.lib"
fatal error LNK1104: cannot open file 'libboost_system-vc110-mt-gd-1_51.lib'
但是,我做了在 (boost_root)/stage/libs
中创建 lib 的 bjam,并将 libs 的路径链接到编译器 C++/Additionnals 包括
.
However, I did the bjam which created the lib in (boost_root)/stage/libs
and I linked the path to the libs to the compiler C++/Additionnals includes
.
如果我查看 (boost_root)/stage/libs
文件 libboost_system-vc110-mt-gd-1_51.lib
不存在.它被称为 libboost_system-vc110-mt-sgd-1_51.lib
.
If I look in (boost_root)/stage/libs
the file libboost_system-vc110-mt-gd-1_51.lib
is not there. It is called libboost_system-vc110-mt-sgd-1_51.lib
instead.
有什么想法吗?
推荐答案
C++ → General → Additional Include Directories 参数用于列出编译器将在其中搜索头文件的目录.
The C++ → General → Additional Include Directories parameter is for listing directories where the compiler will search for header files.
您需要告诉链接器在何处查找要链接的库.要访问此设置,请在解决方案资源管理器 窗口中右键单击项目名称,然后在属性 → 链接器 → 常规 → 其他库目录.在此处输入
(如果您构建,这是库所在的路径)使用默认选项提升).
You need to tell the linker where to look for libraries to link to. To access this setting, right-click on the project name in the Solution Explorer window, then Properties → Linker → General → Additional Library Directories. Enter <boost_path>stagelib
here (this is the path where the libraries are located if you build Boost using default options).
这篇关于致命错误 LNK1104:无法打开文件“libboost_system-vc110-mt-gd-1_51.lib"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:致命错误 LNK1104:无法打开文件“libboost_system-vc110-mt-gd-1_51.lib"
- C++ 协变模板 2021-01-01
- 使用/clr 时出现 LNK2022 错误 2022-01-01
- 一起使用 MPI 和 OpenCV 时出现分段错误 2022-01-01
- 与 int by int 相比,为什么执行 float by float 矩阵乘法更快? 2021-01-01
- 近似搜索的工作原理 2021-01-01
- 从python回调到c++的选项 2022-11-16
- STL 中有 dereference_iterator 吗? 2022-01-01
- 如何对自定义类的向量使用std::find()? 2022-11-07
- Stroustrup 的 Simple_window.h 2022-01-01
- 静态初始化顺序失败 2022-01-01