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"
基础教程推荐
- 管理共享内存应该分配多少内存?(助推) 2022-12-07
- 在 C++ 中循环遍历所有 Lua 全局变量 2021-01-01
- 为什么语句不能出现在命名空间范围内? 2021-01-01
- 如何在不破坏 vtbl 的情况下做相当于 memset(this, ...) 的操作? 2022-01-01
- 使用从字符串中提取的参数调用函数 2022-01-01
- 为 C/C++ 中的项目的 makefile 生成依赖项 2022-01-01
- 如何使图像调整大小以在 Qt 中缩放? 2021-01-01
- Windows Media Foundation 录制音频 2021-01-01
- 从 std::cin 读取密码 2021-01-01
- 如何“在 Finder 中显示"或“在资源管理器中显 2021-01-01