Unknown compiler version while compiling Boost with MSVC 14.0 (VS 2015)(使用 MSVC 14.0 (VS 2015) 编译 Boost 时编译器版本未知)
问题描述
我在尝试在我的计算机上编译 Boost 库时收到未知的编译器版本 - 请运行配置测试并报告结果".
我有最新的 Boost(截至发帖日期)- 1.58.0.
Boost 不支持 MSVC 14.0 吗?我如何运行配置测试"?
I get "Unknown compiler version - please run configure tests and report the results" while attempting to compile Boost library on my computer.
I have most recent Boost (as of date of the post) - 1.58.0.
Doesn't Boost support MSVC 14.0, yet? How do I "run the configure tests"?
.
推荐答案
最新(发布此答案时)Boost 1.58 确实支持 MSVC 14.0 PreviewBoost 1.58 发布时最新的 MS 编译器.现在,最新版本的 Visual Studio 是 2015 RC,boost 1.58 配置文件中未包含该版本.
Latest (at the time of posting this answer) Boost 1.58 does support MSVC 14.0 Preview which was the latest MS compiler at the time of Boost 1.58 release. Now, the latest version of Visual Studio is 2015 RC which isn't covered in the boost 1.58 config file.
要停止 Boost 1.58 抱怨未知编译器版本,请编辑 boost/config/compiler/visualc.hpp
并替换:
To stop Boost 1.58 complaining about unknown compiler version edit boost/config/compiler/visualc.hpp
and replace:
// last known and checked version is 19.00.22129 (VC14 Preview):
#if (_MSC_VER > 1800 && _MSC_FULL_VER > 190022310)
与:
// last known and checked version is 19.00.22816 (VC++ 2015 RC):
#if (_MSC_VER > 1800 && _MSC_FULL_VER > 190022816)
您可以在boost repo 此处中找到即将推出的Boost1.59 发布.
which you can find is already done in boost repo here for upcoming Boost 1.59 release.
更新:对于 Visual Studio 2015 RTM,将其设置为:
// last known and checked version is 19.00.23026 (VC++ 2015):
#if (_MSC_VER > 1800 && _MSC_FULL_VER > 190023026)
Update2:对于 Visual Studio 2015 Update 1,将其设置为:
// last known and checked version is 19.00.23506 (VC++ 2015 Update 1):
#if (_MSC_VER > 1800 && _MSC_FULL_VER > 190023506)
<小时>
此外,如果您之前一直在 toolset=msvc-14.0
上运行 Boost.Build,则从 C:Users
中删除> 以下缓存文件:
Also if you have previously been running Boost.Build on toolset=msvc-14.0
then delete from C:Users<name>AppDataLocalTemp
the following cached files:
b2_msvc_14.0_vcvarsall_x86.cmd
b2_msvc_14.0_vcvarsall_x86_amd64.cmd
b2_msvc_14.0_vcvarsall_x86_arm.cmd
在此处了解更多相关信息.
Update3为了将来参考,在您的 Visual Studio 工具命令提示符中运行命令 cl/Bv
以查看您的版本号(参数区分大小写).
Update3
For future reference, in your Visual Studio Tools Command Prompt run the command cl /Bv
to see your version numbers (the parameters are case sensitive).
我的输出如下:
C:Program Files (x86)Microsoft Visual StudioPreviewProfessionalVCToolsMSVC14.11.25503inHostX64x64cl.exe: Version 19.11.25506.0
C:Program Files (x86)Microsoft Visual StudioPreviewProfessionalVCToolsMSVC14.11.25503inHostX64x64c1.dll: Version 19.11.25506.0
C:Program Files (x86)Microsoft Visual StudioPreviewProfessionalVCToolsMSVC14.11.25503inHostX64x64c1xx.dll: Version 19.11.25506.0
C:Program Files (x86)Microsoft Visual StudioPreviewProfessionalVCToolsMSVC14.11.25503inHostX64x64c2.dll: Version 19.11.25506.0
C:Program Files (x86)Microsoft Visual StudioPreviewProfessionalVCToolsMSVC14.11.25503inHostX64x64link.exe: Version 14.11.25506.0
C:Program Files (x86)Microsoft Visual StudioPreviewProfessionalVCToolsMSVC14.11.25503inHostX64x64mspdb140.dll: Version 14.11.25506.0
C:Program Files (x86)Microsoft Visual StudioPreviewProfessionalVCToolsMSVC14.11.25503inHostX64x641033clui.dll: Version 19.11.25506.0
由此您可以推断出_MSC_VER
是1911(来自文本Version 19.11")而_MSC_FULL_VER
是191125506.
From this you can deduce the _MSC_VER
is 1911 (from the text "Version 19.11") and the _MSC_FULL_VER
is 191125506.
这篇关于使用 MSVC 14.0 (VS 2015) 编译 Boost 时编译器版本未知的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:使用 MSVC 14.0 (VS 2015) 编译 Boost 时编译器版本未知
基础教程推荐
- 如何“在 Finder 中显示"或“在资源管理器中显 2021-01-01
- 使用从字符串中提取的参数调用函数 2022-01-01
- 如何在不破坏 vtbl 的情况下做相当于 memset(this, ...) 的操作? 2022-01-01
- 为什么语句不能出现在命名空间范围内? 2021-01-01
- 如何使图像调整大小以在 Qt 中缩放? 2021-01-01
- 在 C++ 中循环遍历所有 Lua 全局变量 2021-01-01
- Windows Media Foundation 录制音频 2021-01-01
- 为 C/C++ 中的项目的 makefile 生成依赖项 2022-01-01
- 从 std::cin 读取密码 2021-01-01
- 管理共享内存应该分配多少内存?(助推) 2022-12-07