The project could not be compiled

Hello

Today I tried creating an empty C++ project under UE 4.10 and got the error message listed bellow (after the System and Software information).

After some looking I stumbled upon this thread from July of this year: https://forums.unrealengine.com/showthread.php?76265-The-project-could-not-be-compiled-Would-you-like-to-open-it-in-Visual-Studio

It seems to be the exact same problem I have. However the solutions proposed in the Wiki link from the only response did not seem to work. This is partially due to the fact that everything necessary should already be installed with one difference I am running VS2015 and not VS2013. (Considering the recent news that you can install UE4 via VS2015 I doubt this is an issue any more.)

As I am running Windows 10 I did not expect this to work, regardless I did try installing the Windows 7 SDK, as suggested, just in case, at which point it displayed a warning message pointing to a website to download and install “.NET Framework 4.” (which is already installed).

After following the link and trying to install .NET 4. (just in case); it gave me the very predictable: “.NET Framework 4.6.1 or a later update is already installed on this computer.”

(I did try running the windows 10 sdk installer but as with everything else it stated that “the features installed on this computer are up to date”)

With all of that said any help would be greatly appreciated :).
Please reference the following for any information you might need.


System:

  • OS: Windows 10 Home x64
  • Processor: Intel i7-4720HQ 2.6GHz
  • RAM: 16GB DDR3
  • GPU: Nvidia GTX 960M

Software & other info

  • Visual Studio 2015 Update 1

  • *will add onto as / if necessary


ERROR MESSAGE

The project could not be compiled. Would you like to open it in Visual Studio?

Running D:/EpicGames/Epic Games/4.10/Engine/Binaries/DotNET/UnrealBuildTool.exe MyProject Development Win64 -project="C:/Users/Iliyan/Desktop/MyProject/MyProject.uproject" -rocket -editorrecompile -progress -noubtmakefiles -2015
@progress push 5%
Parsing headers for MyProjectEditor
  Running UnrealHeaderTool "C:/Users/Iliyan/Desktop/MyProject/MyProject.uproject" "C:\Users\Iliyan\Desktop\MyProject\Intermediate\Build\Win64\MyProjectEditor\Development\UnrealHeaderTool.manifest" -LogCmds="loginit warning, logexit warning, logdatabase error" -rocket -installed
Reflection code generated for MyProjectEditor in 5.3188198 seconds
@progress pop
Performing 7 actions (4 in parallel)
[2/7] Resource PCLaunch.rc
[3/7] Resource ModuleVersionResource.rc.inl
D:\EpicGames\Epic Games\4.10\Engine\Source\Runtime\Core\Resources\Windows\ModuleVersionResource.rc.inl(3) : fatal error RC1015: cannot open include file 'windows.h'.
D:\EpicGames\Epic Games\4.10\Engine\Source\Runtime\Launch\Resources\Windows\PCLaunch.rc(10) : fatal error RC1015: cannot open include file 'windows.h'.
PCH.MyProject.h.cpp
D:\EpicGames\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:\Users\Iliyan\Desktop\MyProject\Binaries\Win64\UE4Editor-MyProject.dll
Total build time: 10.64 seconds

Hi, please check environment variables:

Open cmd.exe and execute command

set %PATH%

If you don’t find path like C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\

Thеn in VS2015_folder\VC\ and run with admin vcvarsall.bat

Try compile your UE-project again.

Hope this helps!

Hi Andrew,

Thanks for the reply, it gave me some hope for a quick fix. Sadly:

http://i.imgur.com/8D99cT8.png

I ran the vcvarsall.bat to be sure but the same issue persists.

Interesting. Maybe this posts can help?

Hm, I download UE-Source and find this:
\Engine\Source\Programs\UnrealBuildTool\Windows\UEBuildWindows.cs

line 107

/// Whether to compile against the Windows 10 SDK, instead of the Windows 8.1 SDK. This requires the Visual Studio 2015

/// compiler or later, and the Windows 10 SDK must be installed. The application will require at least Windows 8.x to run.

// @todo UWP: Expose this to be enabled more easily for building Windows 10 desktop apps

public static readonly bool bUseWindowsSDK10 = false;

I think that mean:
You need minimal installed Windows SDK 8.1

Or if you need use Windows SDK10 - change bUseWindowsSDK10 to true and recompile UnrealBuildTool/UE.

Try to install Windows SDK 8.1

Hope this helps!

@Andrew2015 Thanks! The last two answers you gave fixed both my problems :slight_smile: (the second one I had not posted about yet)

The issue I raised up in this thread was solved by one of the answers to this:
https://forums.unrealengine.com/showthread.php?98-Cannot-open-include-file-windows-h

(specifically “In visual studio go to project properties - > vc++ directiories and set include and library , library winrt, reference too i think directories to inherit from parent.”, Cube222)

However as this was a Win 8.1 laptop upgraded to Win10 I expected SDK 8.1 to already be present on the machine. It was not. After installing it it solved another problem I was having which was actually running the “GenerateProjectFiles.bat” from the repository as it was not finding an installation of VS2015. With SDK 8.1 it all worked.

Hello Andrew,

I am sorry to tell you this, but I’m afraid it does not work with this tool. Still thank you for trying to help though.