Visual Studio 2019 Preview 1 缺少 windows.h [英] Visual Studio 2019 Preview 1 missing windows.h

查看:26
本文介绍了Visual Studio 2019 Preview 1 缺少 windows.h的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在 Visual Studio 2019 Preview 1 上编译 .cpp 文件,但系统上不存在文件 windows.h.我需要做什么才能使 Visual Studio 可以使用此文件?正在编译的文件包含 include .

I am attempting to compile a .cpp file on Visual Studio 2019 Preview 1 and the file windows.h is not present on the system. What do I have to do to make this file available to Visual Studio? The file being compiled contains include <windows.h>.

推荐答案

windows.h 通常来自 Windows SDK 安装.就像您发现的那样,某些项目甚至可能需要特定版本的 Windows SDK.因此,当出现此类编译错误时,首先要做的就是仔细阅读源代码文档,其中可能会说明需要提前安装什么.

windows.h usually comes from Windows SDK installation. Like you discovered, some projects might even require a certain version of Windows SDK. Therefore, when such compilation errors happen, the first thing to do is to read carefully the source code documentation, which might indicate what is needed to install in advance.

Visual Studio 2017/2019 变得比以前的版本更加模块化,因此可能会丢失一个组件,您可以随时返回 VS 安装程序找到合适的组件进行安装.

Visual Studio 2017/2019 become more modular than previous releases, so missing a component is expected, and you can always go back to VS installer to find the suitable components to install.

这篇关于Visual Studio 2019 Preview 1 缺少 windows.h的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆