无法获得提升::线程与MSVS2013一起工作
Cant get boost::thread to work with MSVS2013
我正在尝试将Boost:thread用于我正在处理的简单http客户端。
我无法让它工作,我使用的所有其他增强库都工作正常。
这是我得到的错误:
Error 7 error LNK2019: unresolved external symbol "public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __thiscall Client::add_user(void)" (?add_user@Client@@QAE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ) referenced in function "public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __thiscall Client::commandBuilder(void)" (?commandBuilder@Client@@QAE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ) C:UsersOrDocumentsVisual Studio 2013ProjectsclientclientClient.obj client
请注意,我遇到了 8 个非常相似的错误。
这是我的包含代码:
#include <boostthread.hpp>
#define BOOST_ALL_DYN_LINK
我已经在VS开发人员cmd中使用以下命令构建了库:
bjam toolset=msvc-12.0 --build-type=complete --with-thread --with-chrono --with-date_time
此外,我的VC++和链接器的包含路径都设置为正确的路径。
我在这里有点迷茫,我尝试使用本指南从头开始构建整个提升:
如何在Visual Studio 2010中使用Boost
仍然没有帮助。
任何帮助将不胜感激。
谢谢
修复了,显然所有的建筑物和建筑物都损坏了我的提升安装。
从我的计算机上删除了所有提升痕迹。
通过执行以下步骤重新安装它:
- 转到使用 VS 开发人员命令行工具的提升目录 快捷方式
-
bootstrap
b2
-
bjam toolset=msvc-11.0 --build-type=complete --with-thread --with-chrono -- with-date_time
将所有库重新配置为正确的库。
使用
#define BOOST_ALL_DYN_LINK
相关文章:
- C++无锁队列与多个线程一起崩溃
- QSocketNotifier:只能与以 QThread 错误开头的线程一起使用
- 无法将线程与第三方库一起暂停
- SetWindowShookex(WH_KEYBOARD)无法与线程ID一起使用
- 与多线程一起登录多进程应用程序
- 读者-作家-作家线程总是与多个读者线程纠缠在一起
- 如何将 Lambda 表达式与多线程一起使用
- 线程池与英特尔线程构建模块一起使用
- 我可以将 Boost.Geometry.index.rtree 与线程一起使用吗?
- 无法获得提升::线程与MSVS2013一起工作
- 如何将非阻塞套接字与多个线程一起使用
- 如何使 CDT/Eclipse 与 C++11 线程一起工作
- Qt同步原语可以与非QThread线程一起使用吗
- 代码步进如何与线程一起工作
- 与icc 14一起使用多线程运行时库时的错误
- 无效地将void表达式与线程和对象一起使用
- 如何将线程与递归模板函数一起使用
- 将 MPI 与线程一起使用的正确方法是什么
- 将 std::atomic_flag 与工作线程一起使用时出现问题
- 将 libev 与多个线程一起使用