Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio 2019 Preview 1 missing windows.h

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>.

like image 493
Jonathan Avatar asked Mar 05 '26 18:03

Jonathan


1 Answers

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 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.

like image 114
Lex Li Avatar answered Mar 08 '26 12:03

Lex Li