Cannot open include file 'windows.h'


I just created a new “FirstPerson” project. However, when compiling, the basic include files are rejected (“windows.h” and “new”). I am able to build non-Unreal projects with Visual studios, this doesn’t look like a missing dependency but like a wrong project file.

Adding $(VC_IncludePath);$(WindowsSDK_IncludePath); to the project configuration works, but since Unreal generates its own projects, I don’t want to add a path manually, I’d like to know if anyone is having the same issue. What could possibly cause this ?

I am using W8 Pro x64, with VS 2013. I have installed the DX (June 2010) runtime, I have .NET4, etc.

Thanks !

I’m still compiling my copy of UE4, but once it’s done I’ll try to reproduce your issue. How did you go about creating the FirstPerson project?

Nothing very surprising I guess : clicked “FirstPerson” (C++, not BP), ticked “include content”, choose a destination and clicked generate.
But I have an idea. I first tried without installing VS2013 and it failed at that moment, so maybe Unreal remembers the old environment ? Because the project file that is generated does not have any path in the settings, no includes, no libs.

Also tried to reboot and regenerate.

Take a look at VCToolChain.cs and make sure its correctly finding WindowsSDKDir; also make sure you have the correct version of the Windows SDK installed (haven’t run into this myself, I am using VS2012).

Thanks. Where is the file supposed to be ?

You need Visual Studio 2013. Make sure you install these before UDK4. It’ll reduce a bunch of errors you might encounter.

I also have VS2012 U4 on this computer (had for some time), but the generated project has the same behavior with it. It is expected IMHO since the project file is basically wrong - All paths are empty, how could it work ?
Is there a way to force a version of Visual Studio ?
Why does the documentation suggest using VS2013 ?

VS2013 is the best supported version as far as I can see. But there is a reference to an additional set of dependencies you can download to make it work on VS2012

I was wrong it does requite 2013. My version isn’t updated yet which is why i was confused since i encountered a similar error using the 2012 without the update 4. I would upgrade to 2013 if you have 2012u4.

Link to VS2013 -

Also a little side note, in my experience windows 8 is terrible for software development of any kind in comparison to the same exact development environment as my windows 7 env. Idk some people agree with me, and some people don’t, just something i noticed.

Okay so I removed the project, all Unreal folders under AppData/Local, removed VS2012 and VS2013.
Then I reinstalled VS2013, relaunched Unreal and recreated the project.

Aaaaaannnd… It’s still exactly the same. The project folders in the project properties are still completely empty.

Do I have to reinstall the entire engine ? Format my computer ?

Is there anything on that ? Where is this file ?

Did you compile from source, or use the installer?

I used the installer. The only illogical thing I did was to generate a C++ project without VS2013 installed, which is probably the cause for all these issues. That’s why I’d like to find how to reset this because clearly, Unreal does not succeed in finding the directories.

Hi Gwenn,

If your problem is persisting, it may be a good idea to post a report on so that we can better assist you.

Thank you and have a great night!

Thanks, question posted here. In the meantime, I am redownloading Unreal Engine entirely.

Every time you run GenerateProjectFiles.bat the VS files are re-generated, and there is no “dependency” of needing VS installed to do so; the project files are generated from the tools included with Unreal (but would be missing the SDK dir since no VS environment variables are present).

The reason your project files are “empty” is because they are simply wrappers around the UnrealBuildTool; the VS project files do not cause VS to directly run the compiler on your source code, instead the UBT is invoked and it generates a great deal of files (to reduce what you need to include, link, etc) and the code it generates is then compiled. This is a huge system, and one that is going to have several nuances for even the most experienced VS developers; I recommend taking a look at this documentation to get familiar: Unreal Build System | Unreal Engine Documentation

The file I was referring to previously is part of the UBT that generates the project files so you will need to debug the execution of it that occurs when running GenerateProject files; assuming you already have access to the Git Hub project you can see the code im talking about here:

Lastly as a tip, you should read this to learn a “trick” for opening any file by name in a visual studio solution using its command interpreter thingy hidden in the find box:

Edit: Do not re-download anything, you are fine :slight_smile:

Yeah you’ll want to have to compiler installed before you install the engine. Since the engine will not know where your compiler is because it’s installed before it exists. Also generating visual studio files helps.

Another thing worth mentioning is how horrible Windows is at updating environment variables after installs; i.e. if you leave a command prompt open (say to run a bat file) then install a program (like VS) and don’t close/re-open the cmd prompt it won’t get any of the new env vars from the installed program. Windows 8 is particularly bad in this area and I have had to log-off or restart to get my env vars to propagate to cmd prompts.

Well I used the installer, so I do not have the engine source and this file does not exist on my computer. I also do not have any “GenerateProjectFiles” but a “RocketGenerateProjectFiles” and it fails when launched, trying to access source code that doesn’t exist. I am not using a source installation and am merely trying to build a basic sample project.

I reinstalled Windows 8.1 SDK and redownloaded UE4 during the night, the problem still stands, nothing will build.

I am now trying to make the engine from source, hoping to get more info on what exactly is wrong. Cloned the relase, installed dependencies, generated files, opened the solution, clicked build.

Cannot open windows.h. UnrealHeaderTool will not compile because of that, and the rest of the engine with it. How exactly can I detect the issue ?

Still no one ? Am I really the only one that can’t get a single project building after trying for 24 hours ?