How to setup VS2015 and UE4.10? (RC1015: cannot open include file 'windows.h')

Hi,

I have the problem of ‘cannot find windows.h’ during compilation, about which I have found a lot of questions, but only a few answers, of which none applies to my setup, mostly because they regard VS 2013 issues.

I use: Windows 7 - UE 4.10.2 - VS2015

I can use VS 2015 on its own without problems. Also I can use Blueprint templates in UE.
But when I tried the beginners tutorial on c++ programming on the UE community site, i got the following error:

The project could not be compiled. Would you like to open it in Visual Studio?
  Running C:/Program Files (x86)/Epic
  Games/4.10/Engine/Binaries/DotNET/UnrealBuildTool.exe
  Test4 Development Win64
-project="C://Unreal Projects/cpp/Test4/Test4.uproject"
-rocket -editorrecompile -progress -noubtmakefiles -2015
 @progress push 5%
 
 Parsing headers for Test4Editor
 Running UnrealHeaderTool "C://Unreal Projects/cpp/Test4/Test4.uproject"
"C:\\Unreal Projects\cpp\Test4\Intermediate\Build\Win64\Test4Editor\Development\UnrealHeaderTool.manifest"
-LogCmds="loginit warning, logexit warning, logdatabase error" -rocket -installed
 Reflection code generated for Test4Editor in 12,2149591 seconds
 @progress pop
 Performing 7 actions (4 in parallel)
 [3/7] Resource ModuleVersionResource.rc.inl
 [2/7] Resource PCLaunch.rc
 
 C:\Program Files (x86)\Epic Games\4.10\Engine\Source\Runtime\Launch\Resources\Windows\PCLaunch.rc(10)
 fatal error RC1015: cannot open include file 'windows.h'.
 PCH.Test4.h.cpp
 
 C:\Program Files (x86)\Epic Games\4.10\Engine\Source\Runtime\Core\Resources\Windows\ModuleVersionResource.rc.inl(3)

fatal error RC1015: cannot open include file 'windows.h'.
C:\Program Files (x86)\Epic Games\4.10\Engine\Source\Runtime\Core\Public\HAL\PlatformIncludes.h(5):
fatal error C1083: Cannot open include
file: 'new': No such file or directory
 -------- End Detailed Actions Stats
-----------------------------------------------------------
 ERROR: UBT ERROR: Failed to produce item: C:\\Unreal
Projects\cpp\Test4\Binaries\Win64\UE4Editor-Test4.dll
Total build time: 64,37 seconds

I tried reinstalling everything (VS2015, Windows SDK, UE) several times, but the problem persists. I also tried to revert to VS2013 as I a few posts of people having made it to work, but the current release of Unreal Editor requires VS2015.

Has anyone a receipt for a working setup on Windows 7

Thanks,

(Sorry for the formatting, I tried my best)

Hey mariusholm-

Can you also check that your anti-virus software is not interfering or blocking any UE files? You can find more information about the RC1015 error here: A new, community-hosted Unreal Engine Wiki - Announcements - Epic Developer Community Forums .

Cheers

Hi ,

Thank you for answering. I don’t have any antivirus installed.
I looked at the page you suggested, and double checked the issues mentioned there, but they all seem to be ok. I have been searching quite a bit on your guides and forums to find a solution, and these issues have been addressed there.
The problem seems to be that there are so many versions of everything, and they all have to be compatible with each other, which obviously must be hard with the rate at which software versions are released.
Especially this seems to be an ever occuring problem with MS products.

Well, in order to track down the cause of my faulty installation, I will provide you with some more detail.

I started with downloading and installing EpicGamesLauncherInstaller-2.8.3-2819560.msi
This gave me the Unreal Editor and Epic Game Launcher, through which I downloaded and installed the Unreal Engine 4.9.2
After playing around a bit with scenery creation through Blueprint templates, which worked great, I found the time mature to go on to more serious programming, I then downloaded and installed VS2015 community edition (the free one) and followed the Programmer Quick Start tutorial at the Unreal Community site (which I found in the learning section in the Epic game launcher). Then, when I clicked ‘Create Project’ I got the same error as mentioned in my first post (I cannot be totally certain it was exactly alike, as the message I posted is from the approximately eighth attempt, but conclusion was similar: Cannot open windows.h)
A quick search on my computer confirmed thre was no windows.h indeed, so I realized i needed the Windows 7 SDK.
I then downloaded ‘Microsoft Windows SDK for Windows 7 and .NET Framework 4’ which MS issued a long time ago, bundled with old .Net versions, and the SDK installer does not recognise newer versions, so it meant I had to uninstall the .Net framework for SDK installation to run smoothly, and then reinstall the newer version. I added the path to the include directory of the SDK (C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Include) which will let me run a test .bat file in that directory from the command prompt, which obviously means the path is fine.
After this point, I can not remember in which order I have uninstalled and reinstalled the following products/packages: Epic Game Launcher, Unreal Engine (which by the way has updated itself to 4.10.2 in the meantime, but I installled 4.9.2 again also to try both), VS2015, VS2013, Windows SDK) but I have tried VS before UE, and UE before VS, and removing everything, then reinstalling 1)SDK 2)VS2013 3)VS2015 4)Epic game launcher and 5)Unreal Engine.
I have also tried the guide from Microsoft to install UE from VS , which completed without error, but with the same result when trying to create a project from UE. I then thought I might create a project in VS2015, and then open it in Unreal Editor, but although the ‘Install Unreal Engine’ option is gone from VS after I installed it, I cannot find any options to do so.
I’m thinking that the registry might be quite messy after all this installing/uninstalling; but I don’t really know what to look for in the registry, or how it should be.

Well, a lot of text there, you might interpret it as my level of frustration. I’m sorry, but it’s hard to write detailed and short at the same time when english is not your mother tongue…

Can you please help me? I think it would be so awesome to use your engine. Maybe it’s better to build it from source code? Would you then recommend to use VS2015?

Best regards,

P.S I also installed DirectX SDK June 2010 as I some forum post that this ws required, but it hasn’t made any difference.

If you do decide to build source I would recommend using VS2015. Doing so is a fairly strait forward process. If you already have a free account on GitHub and have associated your Epic Games account with your GitHub account (info on how to do so can be found here: Unreal Engine on GitHub - Unreal Engine) you should be able to access the Unreal Engine repository. Detailed steps on how to build the source can be found here: A new, community-hosted Unreal Engine Wiki - Announcements - Epic Developer Community Forums

Going back to the original issue, have you checked that the environment variables are set correctly? The same troubleshooting guide I linked previously explains how to access the environment variables and what to look for. Can you confirm that "C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit" is listed as explained in the directions? If it is not you should be able to add this to the Path variables.

Hi ,

As I use windows 7, my SDK is installed at C:\Program Files (x86)\Microsoft SDKs, with the include files (windows.h and others) in the subdir Windows\v7.1A\Include. The path envvar includes this path (C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Include), which I double checked by running a test .bat file from prompt.
Does the Windows 8 resource kit you refer to include other resources that are necessary, or should the Win7 SDK be sufficient?

Regards,

I too use Windows 7 however my Environment Variables’ Path has the same settings as I mentioned before. I would suggest trying a more recent SDK as it seems that you have tried other known fixes already. I hate to suggest this but as an absolute last resort you can try to reinstall Windows.

Hi, I really don’t like that last solution either, but now it looks like I might have to, as my computer behaves quite strange after all my installing/uninstalling of packages I don’t need for any other purpose than this.
Do you have some recipe for installation on a fresh Windows 7 system when I’m ready to try again?
Preferrably with links to the right SDK’s and other resources.

Regards

If you’re working with a fresh install of Windows 7 you will want to make sure you have the Widows SDK for Win7 which can be found here (www.microsoft.com/en-us/download/details.aspx?id=8279). You’ll also want to download/install Visual Studio. It would be best to use the Community version over the Express version (if you don’t already have a Pro licensee). Visual Studio can be downloaded here (Download Visual Studio Tools - Install Free for Windows, Mac, Linux). When installing VS2015 make sure to check the box for ProgrammingLanguages->C++ and CommonTools.