10后包含路径的问题

10后包含路径的问题

本文介绍了重置Windows 10后包含路径的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不得不重置Windows 10并重新安装VS 2017.现在编译的C ++程序不会。主要错误是E1696无法打开源代码"stddef.h"。例如。如果我开始一个新项目并包括"stddef.h"它编译
没有任何问题。

I had to reset Windows 10 and reinstall VS 2017. Now C++ programs which previously compiled won't. The main error is E1696 cannot open source "stddef.h" for example. if I start a new project and include "stddef.h" it compiles with no problems.

我看过路径,似乎没什么奇怪的。我很感激有人指出我正确的方向来解决这个问题。

I've looked at the paths and nothing seems strange. I'd appreciate someone pointing me in the right direction to solve this issue.

非常感谢。

推荐答案

另一个问题是,既然你提到了stddef,你确定Windows SDK是正确?全新安装的Visual Studio将安装Windows 10 SDK版本10.0.17763。可能是你之前没有安装过这个。
我认为Visual Studio在创建新项目时默认使用最新安装的SDK,但它不会自动使用较旧的SDK更新项目。

Another question is, since you mentioned stddef, did you make sure that the Windows SDK is correct? A fresh install of Visual Studio would have installed the Windows 10 SDK version 10.0.17763. It could have been that you didn't have this installed before. I think Visual Studio defaults to the newest installed SDK when you create a new project, but it doesn't automatically update projects with older SDKs.

要做的事情是检查安装了哪个版本的Windows SDK,您可以通过Visual Studio安装程序进行检查。

The thing to do is check what version of the Windows SDK is installed, you can check this through the Visual Studio installer.

接下来检查以确保Visual Studio中的项目设置为相同版本。

Next check to make sure that your project in Visual Studio is set to this same version.

请注意安装程序说我安装了10.0.17763并且项目属性还显示我使用的是10.0.17763 SDK。整个版本号必须匹配。

Please note that the installer says I have 10.0.17763 installed and the project properties also show that I am using the 10.0.17763 SDK. The entire version number must match.

另请注意,项目属性具有"所有配置"和"所有配置"。和"所有平台"在顶部选中。这是为了确保Visual Studio始终使用此SDK。

Also notice that the project properties have "All Configurations" and "All Platforms" selected at the top. This is to ensure that Visual Studio will always use this SDK.


这篇关于重置Windows 10后包含路径的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-31 04:21