问题描述
我将 Visual Studio 从 Community 2015 升级到 Community 2017.现在当我构建时,我收到错误消息说错误(活动)E1696 无法打开源文件stdio.h""引用的行如下所示:
I upgraded Visual Studio from Community 2015 to Community 2017. Now when I build I get error messages saying 'Error (active) E1696 cannot open source file "stdio.h"' The referenced line looks like this:
#include <stdio.h>
如果我创建一个新项目,就会找到 stdio.h.
If I create a new project, stdio.h is found.
于是我查看了项目配置属性->VC++目录,我看到了这个:
So I looked at the project Configuration Properties->VC++ Directories and I see this:
Include Directories $(VC_IncludePath);$(WindowsSDK_IncludePath);
所以似乎需要设置 VC_IncludePath 但我找不到任何设置它的地方.请注意,我找不到宏,可能是因为我使用的是 Visual Studio 2017 的免费版本.
So it seems that VC_IncludePath needs to be set but I can't find any place to set that. Note that I can't find Macro's and it may be because I'm using the free version of Visual Studio 2017.
有人可以提出建议吗?
推荐答案
您的 PC 上似乎未安装您尝试使用的 Windows SDK 版本.您应该检查您的项目使用的 SDK 版本(在属性中)可以更改为 10.0.14393.0
Seems like the Windows SDK Version you're trying to use is not installed on your PC. You should check the used SDK Version of your Project (in Properties) which can be changed to 10.0.14393.0
您也可以再次运行 Visual Studio 安装程序,然后在您的 VS17 版本上单击修改",转到高级"并检查是否标记了所需的 SDK.如果没有标记并安装它.
Also you can run your Visual Studio installer again and click Modify on your VS17 Version, go to Advanced and check if the required SDK is marked. If not mark it and install it.
这篇关于无法打开 stdio.h的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!