我正在运行 Windows 10 并在我的笔记本电脑中安装了 Visual Studio 2017 社区版。我有一些在 VS 2015 中使用 64 位 Boost 1.62.0 编译良好的旧程序。由于一些非常奇怪的原因,我找不到使用 VS 2017 和以下命令行从 Boost 1.64.0(这里是文件系统和计时器)编译任何库的方法:
b2 –build-dir=..\build_here –with-filesystem –with-timer –address-model=64
该命令将执行并构建库,但为 32 位!
可能出了什么问题?
问候,胡安·登特
原文由 Juan Dent 发布,翻译遵循 CC BY-SA 4.0 许可协议
更新我在 这里 给出的答案。
Visual Studio 2017
是一个新的工具集,所以只需将toolset=msvc-14.0
(用于Visual Studio 2015
)替换为toolset=msvc-14.1
ee268ad59a82cb9dbd4—在 Visual Studio 工具命令提示符中:
对于静态库(推荐用于 Windows):
注意:线程必须使用动态链接构建,请参阅: https ://studiofreya.com/2015/05/20/the-simplest-way-of-building-boost-1-58-for-32-bit-and-64 -bit-architectures-with-visual-studio/
在动态库中构建线程: