致命错误 LNK1104:无法打开文件“libboost_system-vc110-mt-gd-1_51.lib&quo

2023-06-29C/C++开发问题
3

本文介绍了致命错误 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.

您需要告诉链接器在何处查找要链接的库.要访问此设置,请在解决方案资源管理器 窗口中右键单击项目名称,然后在属性 → 链接器 → 常规 → 其他库目录.在此处输入 stagelib(如果您构建,这是库所在的路径)使用默认选项提升).

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"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

The End

相关推荐

无法访问 C++ std::set 中对象的非常量成员函数
Unable to access non-const member functions of objects in C++ std::set(无法访问 C++ std::set 中对象的非常量成员函数)...
2024-08-14 C/C++开发问题
17

从 lambda 构造 std::function 参数
Constructing std::function argument from lambda(从 lambda 构造 std::function 参数)...
2024-08-14 C/C++开发问题
25

STL BigInt 类实现
STL BigInt class implementation(STL BigInt 类实现)...
2024-08-14 C/C++开发问题
3

使用 std::atomic 和 std::condition_variable 同步不可靠
Sync is unreliable using std::atomic and std::condition_variable(使用 std::atomic 和 std::condition_variable 同步不可靠)...
2024-08-14 C/C++开发问题
17

在 STL 中将列表元素移动到末尾
Move list element to the end in STL(在 STL 中将列表元素移动到末尾)...
2024-08-14 C/C++开发问题
9

为什么禁止对存储在 STL 容器中的类重载 operator&amp;()?
Why is overloading operatoramp;() prohibited for classes stored in STL containers?(为什么禁止对存储在 STL 容器中的类重载 operatoramp;()?)...
2024-08-14 C/C++开发问题
6