Download

UE4 fails to create C++ projects

Hi

I’m new to UE, so I’m still experimenting with it, looking at all the example projects and stuff like that. I wanted to try out a C++ project, since I know C++ relatively well, and I wish to use it in UE4 in the future. Even though I have Visual Studio 2013 Community update 4 installed (I went with the community version because I read that the express version doesn’t work), but UE4 can’t compile C++ projects for some reason. Here’s the message I get when I try to create a new C++ project:



The project failed to compile with this version of the engine. Build output is as follows:

Running D:/Program Files/Epic Games/4.7/Engine/Binaries/DotNET/UnrealBuildTool.exe first_person_test Development Win64 -project="D:/UE4_Projects/first_person_test/first_person_test.uproject" -rocket -editorrecompile -progress
Parsing headers for first_person_testEditor
Reflection code generated for first_person_testEditor
Performing 10 actions (2 in parallel)
[2/10] Resource ModuleVersionResource.rc.inl
PCH.first_person_test.first_person_test.h.cpp
D:\Program Files\Epic Games\4.7\Engine\Source\Runtime\Core\Resources\Windows\ModuleVersionResource.rc.inl(3) : fatal error RC1015: cannot open include file 'windows.h'.

D:\Program Files\Epic Games\4.7\Engine\Source\Runtime\Core\Public\HAL\PlatformIncludes.h(5) : fatal error C1083: Cannot open include file: 'new': No such file or directory
[3/10] Resource first_person_test.rc
D:\UE4_Projects\first_person_test\Source\first_person_test\Resources\Windows\first_person_test.rc(8) : fatal error RC1015: cannot open include file 'windows.h'.

-------- End Detailed Actions Stats -----------------------------------------------------------
ERROR: UBT ERROR: Failed to produce item: D:\UE4_Projects\first_person_test\Binaries\Win64\UE4Editor-first_person_test.dll
Cumulative action seconds (4 processors): 0,00 building projects, 0,37 compiling, 0,00 creating app bundles, 0,00 generating debug info, 0,00 linking, 0,00 other
UBT execution time: 6,41 seconds

Also, if I try to open the project in VS, it tells me that something’s wrong with it. Any ideas? I would really appreciate any help. It frustrates me that I can’t use C++ in UE4 :frowning: Btw, I’m using version 4.7.6.

Hello Adam,

Apparently this is an issue with VS2013 community. There’s a fix here: http://stackoverflow.com/questions/12748896/cannot-open-windows-h

Please, report back if it worked, so other people with the same issue can find the solution here :slight_smile: