Boost cpp and Visual Studio 2015
Boost cpp and Visual Studio 2015
我正在尝试在Visual Studio 2015上运行cpp应用程序。此应用程序是使用 boost 1.55 使用 Visual Studio 2010 开发的,因此我使用 b2 --toolset=msvc-10.0 --build-type=complete architecture=x86 address-model=64 stage
编译了库,在链接器部分添加了 dll 文件夹,并在成瘾包含中添加了包含目录。尽管如此,我仍然收到很多错误,例如:
namespace "std" do not include member "time_t"
namespace "std" do not include member "system"
您对我如何解决这个问题有任何想法吗?
谢谢。
好吧,这看起来有点混乱。
首先,添加正确的包含:
#include <ctime> //for std::time_t
#include <cstdlib> // for std::system
然后,在为 msvc2015 构建 boost 时,您必须选择 msvc-14.0 工具集而不是 msvc-10.0(适用于 msvc2010)和一致的体系结构(32 或 64)。 所以你的构建命令看起来像这样:
b2 --toolset=msvc-14.0 --build-type=complete address-model=64 stage //for 64 bits
相关文章:
- Visual Studio 2015:Extern "C" 和 "export" 关键字
- Qt Visual Studio 2015 加载项编译问题
- 包含在 <WinSock2> Visual Studio 2015 中时出现错误
- 在 Windows 10 上的 Visual Studio 2015 中使用 _open 和 _setmode
- 如何在不进入 Visual Studio 2015 中的外部库的情况下单步执行我的代码 (F11)
- c++ Visual Studio 2015 快捷方式,用于从选择代码中生成功能
- Visual Studio 2015资源视图和资源编译器使用不同的方法在项目目录中查找图标文件.如何修复
- Visual Studio 2015 中的调试速度很慢 -- 无法关闭页面堆?
- 安装 SFML 后 Visual Studio 2015 中出现错误
- WinDBG适用于从Visual Studio 2015保存的转储,但不适用于任务管理器。显示异常代码"not found"
- Visual Studio 2015 安装问题
- 迁移到 Visual Studio 2015 时 ATL 不起作用
- Qt5.9.1 和 Visual Studio 2015 添加了 Qt WebEngine 模块
- 外部 "C" Visual Studio 2015 中的显式类型错误,DLL 测试代码
- CMake 和 Visual Studio 2015 - C 编译器 cl.exe 无法编译简单的测试程序
- 如何在 Linux 中运行 Visual Studio 2015 托管 c++ 测试函数?
- Visual Studio 2015:在远程编译(在Raspberry上)和本地编译(在Windows上)之间切换
- 如何调试Visual Studio 2015中的现有C 源代码
- Visual Studio 2015更新3 -C 编译器错误
- 包括DLL中的OpenVDB;将错误与Visual Studio 2015联系起来