c++ - 无法使用 Visual Studio 2015 Pro 构建 boost 1.60

标签 c++ visual-studio boost visual-studio-2015

平台是Windows server 2012R2。安装的工具集是带有更新 1 的 VS2015 和 Windows Driver Kit 10。

我运行“VS2015 x64 native 工具命令提示符”,导航到我解压缩的 boost_1_60_0 文件夹并运行 bootstrap.bat(还使用选项“msvc”运行)。

它很快就失败了:

Building Boost.Build engine

Failed to build Boost.Build engine.
Please consult bootstrap.log for further diagnostics.

You can try to obtain a prebuilt binary from

   http://sf.net/project/showfiles.php?group_id=7586&package_id=72941

Also, you can file an issue at http://svn.boost.org
Please attach bootstrap.log in that case.

以及 bootstrap.log 内容:

###
### Using 'vc14' toolset.
###

C:\git\3rdpartySW\boost-build\boost_1_60_0\tools\build\src\engine>if exist bootstrap rd /S /Q bootstrap 

C:\git\3rdpartySW\boost-build\boost_1_60_0\tools\build\src\engine>md bootstrap 

C:\git\3rdpartySW\boost-build\boost_1_60_0\tools\build\src\engine>cl /nologo /RTC1 /Zi /MTd /Fobootstrap/ /Fdbootstrap/ -DNT -DYYDEBUG -wd4996 kernel32.lib advapi32.lib user32.lib /Febootstrap\jam0  command.c compile.c constants.c debug.c execcmd.c execnt.c filent.c frames.c function.c glob.c hash.c hdrmacro.c headers.c jam.c jambase.c jamgram.c lists.c make.c make1.c object.c option.c output.c parse.c pathnt.c pathsys.c regexp.c rules.c scan.c search.c subst.c timestamp.c variable.c modules.c strings.c filesys.c builtins.c md5.c class.c cwd.c w32_getreg.c native.c modules/set.c modules/path.c modules/regex.c modules/property-set.c modules/sequence.c modules/order.c 
command.c
c:\git\3rdpartysw\boost-build\boost_1_60_0\tools\build\src\engine\jam.h(34): fatal error C1083: Cannot open include file: 'ctype.h': No such file or directory
compile.c
c:\git\3rdpartysw\boost-build\boost_1_60_0\tools\build\src\engine\jam.h(34): fatal error C1083: Cannot open include file: 'ctype.h': No such file or directory
constants.c
debug.c
c:\git\3rdpartysw\boost-build\boost_1_60_0\tools\build\src\engine\jam.h(34): fatal error C1083: Cannot open include file: 'ctype.h': No such file or directory
execcmd.c
c:\git\3rdpartysw\boost-build\boost_1_60_0\tools\build\src\engine\jam.h(34): fatal error C1083: Cannot open include file: 'ctype.h': No such file or directory
execnt.c
c:\git\3rdpartysw\boost-build\boost_1_60_0\tools\build\src\engine\jam.h(34): fatal error C1083: Cannot open include file: 'ctype.h': No such file or directory
filent.c
c:\git\3rdpartysw\boost-build\boost_1_60_0\tools\build\src\engine\jam.h(34): fatal error C1083: Cannot open include file: 'ctype.h': No such file or directory
frames.c
c:\git\3rdpartysw\boost-build\boost_1_60_0\tools\build\src\engine\jam.h(34): fatal error C1083: Cannot open include file: 'ctype.h': No such file or directory
function.c
c:\git\3rdpartysw\boost-build\boost_1_60_0\tools\build\src\engine\jam.h(34): fatal error C1083: Cannot open include file: 'ctype.h': No such file or directory
glob.c
c:\git\3rdpartysw\boost-build\boost_1_60_0\tools\build\src\engine\jam.h(34): fatal error C1083: Cannot open include file: 'ctype.h': No such file or directory
hash.c
c:\git\3rdpartysw\boost-build\boost_1_60_0\tools\build\src\engine\jam.h(34): fatal error C1083: Cannot open include file: 'ctype.h': No such file or directory
hdrmacro.c
c:\git\3rdpartysw\boost-build\boost_1_60_0\tools\build\src\engine\jam.h(34): fatal error C1083: Cannot open include file: 'ctype.h': No such file or directory
headers.c
c:\git\3rdpartysw\boost-build\boost_1_60_0\tools\build\src\engine\jam.h(34): fatal error C1083: Cannot open include file: 'ctype.h': No such file or directory
jam.c
c:\git\3rdpartysw\boost-build\boost_1_60_0\tools\build\src\engine\jam.h(34): fatal error C1083: Cannot open include file: 'ctype.h': No such file or directory
jambase.c
jamgram.c
c:\git\3rdpartysw\boost-build\boost_1_60_0\tools\build\src\engine\jam.h(34): fatal error C1083: Cannot open include file: 'ctype.h': No such file or directory
lists.c
c:\git\3rdpartysw\boost-build\boost_1_60_0\tools\build\src\engine\jam.h(34): fatal error C1083: Cannot open include file: 'ctype.h': No such file or directory
make.c
c:\git\3rdpartysw\boost-build\boost_1_60_0\tools\build\src\engine\jam.h(34): fatal error C1083: Cannot open include file: 'ctype.h': No such file or directory
make1.c
c:\git\3rdpartysw\boost-build\boost_1_60_0\tools\build\src\engine\jam.h(34): fatal error C1083: Cannot open include file: 'ctype.h': No such file or directory
object.c
c:\git\3rdpartysw\boost-build\boost_1_60_0\tools\build\src\engine\jam.h(34): fatal error C1083: Cannot open include file: 'ctype.h': No such file or directory
Generating Code...
Compiling...
option.c
c:\git\3rdpartysw\boost-build\boost_1_60_0\tools\build\src\engine\jam.h(34): fatal error C1083: Cannot open include file: 'ctype.h': No such file or directory
output.c
c:\git\3rdpartysw\boost-build\boost_1_60_0\tools\build\src\engine\jam.h(34): fatal error C1083: Cannot open include file: 'ctype.h': No such file or directory
parse.c
c:\git\3rdpartysw\boost-build\boost_1_60_0\tools\build\src\engine\jam.h(34): fatal error C1083: Cannot open include file: 'ctype.h': No such file or directory
pathnt.c
c:\git\3rdpartysw\boost-build\boost_1_60_0\tools\build\src\engine\strings.h(11): fatal error C1083: Cannot open include file: 'stddef.h': No such file or directory
pathsys.c
c:\git\3rdpartysw\boost-build\boost_1_60_0\tools\build\src\engine\jam.h(34): fatal error C1083: Cannot open include file: 'ctype.h': No such file or directory
regexp.c
c:\git\3rdpartysw\boost-build\boost_1_60_0\tools\build\src\engine\jam.h(34): fatal error C1083: Cannot open include file: 'ctype.h': No such file or directory
rules.c
c:\git\3rdpartysw\boost-build\boost_1_60_0\tools\build\src\engine\jam.h(34): fatal error C1083: Cannot open include file: 'ctype.h': No such file or directory
scan.c
c:\git\3rdpartysw\boost-build\boost_1_60_0\tools\build\src\engine\jam.h(34): fatal error C1083: Cannot open include file: 'ctype.h': No such file or directory
search.c
c:\git\3rdpartysw\boost-build\boost_1_60_0\tools\build\src\engine\jam.h(34): fatal error C1083: Cannot open include file: 'ctype.h': No such file or directory
subst.c
c:\git\3rdpartysw\boost-build\boost_1_60_0\tools\build\src\engine\jam.h(34): fatal error C1083: Cannot open include file: 'ctype.h': No such file or directory
timestamp.c
c:\git\3rdpartysw\boost-build\boost_1_60_0\tools\build\src\engine\jam.h(34): fatal error C1083: Cannot open include file: 'ctype.h': No such file or directory
variable.c
c:\git\3rdpartysw\boost-build\boost_1_60_0\tools\build\src\engine\jam.h(34): fatal error C1083: Cannot open include file: 'ctype.h': No such file or directory
modules.c
c:\git\3rdpartysw\boost-build\boost_1_60_0\tools\build\src\engine\jam.h(34): fatal error C1083: Cannot open include file: 'ctype.h': No such file or directory
strings.c
c:\git\3rdpartysw\boost-build\boost_1_60_0\tools\build\src\engine\jam.h(34): fatal error C1083: Cannot open include file: 'ctype.h': No such file or directory
filesys.c
c:\git\3rdpartysw\boost-build\boost_1_60_0\tools\build\src\engine\jam.h(34): fatal error C1083: Cannot open include file: 'ctype.h': No such file or directory
builtins.c
c:\git\3rdpartysw\boost-build\boost_1_60_0\tools\build\src\engine\jam.h(34): fatal error C1083: Cannot open include file: 'ctype.h': No such file or directory
md5.c
md5.c(55): fatal error C1083: Cannot open include file: 'string.h': No such file or directory
class.c
c:\git\3rdpartysw\boost-build\boost_1_60_0\tools\build\src\engine\strings.h(11): fatal error C1083: Cannot open include file: 'stddef.h': No such file or directory
cwd.c
c:\git\3rdpartysw\boost-build\boost_1_60_0\tools\build\src\engine\jam.h(34): fatal error C1083: Cannot open include file: 'ctype.h': No such file or directory
w32_getreg.c
c:\git\3rdpartysw\boost-build\boost_1_60_0\tools\build\src\engine\jam.h(34): fatal error C1083: Cannot open include file: 'ctype.h': No such file or directory
Generating Code...
Compiling...
native.c
c:\git\3rdpartysw\boost-build\boost_1_60_0\tools\build\src\engine\strings.h(11): fatal error C1083: Cannot open include file: 'stddef.h': No such file or directory
set.c
c:\git\3rdpartysw\boost-build\boost_1_60_0\tools\build\src\engine\strings.h(11): fatal error C1083: Cannot open include file: 'stddef.h': No such file or directory
path.c
c:\git\3rdpartysw\boost-build\boost_1_60_0\tools\build\src\engine\strings.h(11): fatal error C1083: Cannot open include file: 'stddef.h': No such file or directory
regex.c
c:\git\3rdpartysw\boost-build\boost_1_60_0\tools\build\src\engine\modules\../mem.h(67): fatal error C1083: Cannot open include file: 'stdlib.h': No such file or directory
property-set.c
c:\git\3rdpartysw\boost-build\boost_1_60_0\tools\build\src\engine\strings.h(11): fatal error C1083: Cannot open include file: 'stddef.h': No such file or directory
sequence.c
c:\git\3rdpartysw\boost-build\boost_1_60_0\tools\build\src\engine\strings.h(11): fatal error C1083: Cannot open include file: 'stddef.h': No such file or directory
order.c
c:\git\3rdpartysw\boost-build\boost_1_60_0\tools\build\src\engine\modules\../mem.h(67): fatal error C1083: Cannot open include file: 'stdlib.h': No such file or directory
Generating Code...

C:\git\3rdpartySW\boost-build\boost_1_60_0\tools\build\src\engine>exit /b 2 

有什么想法为什么我无法构建? This site建议它应该非常简单。

最佳答案

基于 Tmayto 的回答和 workaround我在那里的评论中提到,我发现 ctype.h 不在 Visual Studio 树中,而是在 Windows 工具包树中。此外,它不在 %INCLUDE% 指定的路径内,而是在 10.0.10240.0\ucrt(和 10.0.10150.0\ucrt)中.因此,除了 wdf 之外,我还把 10.0.10586.0 标记为隐藏(详见下图)。现在,boost 正在 build 中。

MS 真的需要修复他们的东西!似乎其中一个脚本只是盲目地假设 header 位于“最新”或“最高编号”文件夹中。

我不知道这样做会产生什么影响,因为我还没有开始尝试编译我们需要的驱动程序……做这样的事情非常令人不安,并且可能会在以后破坏一些重要的东西。

更新:安装 WDK 10 和 SDK 10 后,10.0.10586.0 文件夹已正确填充,也无需将其标记为隐藏。虽然我不知道哪个工具包部署了该文件夹,但我怀疑之前缺少 header 是因为安装了较早的版本。

Mark the following folders "hidden"

关于c++ - 无法使用 Visual Studio 2015 Pro 构建 boost 1.60,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36136978/

相关文章:

带有换行符的 C++ OutputDebugStringW

c++ - 如何在监 window 口中转换为未命名命名空间中的类型?

c++ - boost 压缩对和空对象的地址

c++ - 我如何在后台的 dll 中使用 muti boost 线程

c++ - 使用图形库/节点网络库还是自己编写?

c++ - 以特殊顺序填充矩阵 C++

python - 如何在Python中从二进制文件中读取double、float和int值?

c++ - MongoCXX 3.4 - 使用 unix 域套接字 URI

c# - 在 Visual Studio 2012 中更改 C# 项目中的文件完整路径

javascript - 什么 VS 魔术提供 ".js.bundle"功能来组合 JavaScript 文件?