我在VS 2015上安装了c ++包,如果我尝试构建项目,则会出现以下问题:
C1083无法打开包含文件:'ctype.h':没有这样的文件或目录Win32Project5 c:\ program files(x86)\ windows kits\8.1\include\um\winnt.h 31
可能的解决方案......
使用Visual Studio 2015,我无法再使用命令行工具编译和链接简单的C++程序.
考虑main.cpp:
#include <stdlib.h>
int main() { return 0; }
Run Code Online (Sandbox Code Playgroud)
在以前的版本中(例如Visual Studio 2012),我能够轻松地编译和链接main.cpp:
C:\Users\bkircher\src\test>cl main.cpp
Microsoft (R) C/C++ Optimizing Compiler Version 17.00.61030 for x64
Copyright (C) Microsoft Corporation. All rights reserved.
main.cpp
Microsoft (R) Incremental Linker Version 11.00.61030.0
Copyright (C) Microsoft Corporation. All rights reserved.
/out:main.exe
main.obj
Run Code Online (Sandbox Code Playgroud)
并做了.
但是,在Visual Studio 2015中,我不再设置正确的CRT包含和库路径:
C:\Users\bkircher\src\test>cl main.cpp
Microsoft (R) C/C++ Optimizing Compiler Version 19.00.23026 for x64
Copyright (C) Microsoft Corporation. All rights reserved.
main.cpp
main.cpp(1): fatal error C1083: Cannot open include file: …Run Code Online (Sandbox Code Playgroud) 平台是Windows服务器2012R2.安装的工具集是VS2015,带有更新1和Windows驱动程序工具包10.
我运行"VS2015 x64 Native Tools命令提示符",导航到我的解压缩的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.
Run Code Online (Sandbox Code Playgroud)
和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 …Run Code Online (Sandbox Code Playgroud)