Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Basic C++ template does not compile

Hello there. I'm trying to setup VS2013 and UE4 to start developing using a basic C++ template but I can't get it running properly...

I can create a new project from Blueprints and it runs, so it should not be a problem of UE installation. But when I try to create a new project from C++ template, UE4 says there was an error while compiling and lets me open it with VS. When I try to build it from VS it throws me that error:

 1>------ Build started: Project: MyProject, Configuration: DebugGame_Editor x64 ------
 1>  Performing 7 actions (4 in parallel)
 1>  [3/7] Resource MyProject.rc
 1>  [2/7] Resource ModuleVersionResource.rc.inl
 1>C:\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'.
 1>K:\PROYECTOS\Juegos\UE4\MyProject\Source\MyProject\Resources\Windows\MyProject.rc(8): fatal error RC1015: cannot open include file 'windows.h'.
 1>  PCH.MyProject.MyProject.h.cpp
 1>C:\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
 1>  -------- End Detailed Actions Stats -----------------------------------------------------------
 1>ERROR : UBT error : Failed to produce item: K:\PROYECTOS\Juegos\UE4\MyProject\Binaries\Win64\UE4Editor-MyProject-Win64-DebugGame.dll
 1>  Cumulative action seconds (4 processors): 0,00 building projects, 0,75 compiling, 0,00 creating app bundles, 0,00 generating debug info, 0,00 linking, 0,00 other
 1>  UBT execution time: 4,67 seconds
 1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.MakeFile.Targets(38,5): error MSB3073: The command ""C:\Program Files\Epic Games\4.7\Engine\Build\BatchFiles\Build.bat" MyProjectEditor Win64 DebugGame "K:\PROYECTOS\Juegos\UE4\MyProject\MyProject.uproject" -rocket" exited with code -1.
 ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

I've removed every Visual Studio program and folder (from /Program Files and /Program Files(x86)), excepting VS2010 for Office.

I reinstalled VS2013 Community directly from Microsoft's webpage, and also did it from UE4 launcher (when you try to create a new project from C++ templates it checks if you have VS and, if not, tells you to install it). When I installed VS I did not choose to install Windows Phone SDK, SQL for Visual Studio, Microsoft App helper and other optional stuff it lets you install.

EDIT: I reinstalled Epic Games Launcher (and, of course, UE4) cleaning the registry and deleting all folders related under Program Files. Still doesn't work.

I don't know why it can't find 'windows.h' and haven't found any effective solution anywhere. Thanks in advance to anyone who can help me.

Product Version: UE 4.7
more ▼

asked May 19 '15 at 08:08 PM in Installation & Setup

avatar image

56 2 5 26

avatar image spazchicken May 19 '15 at 09:49 PM

did you install VS before of after you installed UE4 ?

avatar image jjimenezg93 May 19 '15 at 09:54 PM

I uninstalled both. Installed VS and then UE4.

Then I uninstalled VS and installed it again without re-installing UE4.

If there is a way I can clearly re-install both making sure it will work, would appreciate if you tell me how. Thanks

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

2 answers: sort voted first

Ok, so after some hours of googling and tons of lines read later, I got the solution. I haven't been able to check if the editor works well, but at least now it compiles from VS and runs UE Editor.

The solution is this:

  1. Create the project from template, if UE tells you it failed to compile, open the project with VS.

  2. Wait until VS finishes trying to build it if this is the case.

  3. Right-click on the project (inside solution explorer) > Properties.

  4. Click on Include Directories and, in the dropdown choose ``, check it adds something like $(VC_IncludePath);$(WindowsSDK_IncludePath);.

  5. Do the same for Library Directories. It should be something like $(VC_LibraryPath_x64);$(WindowsSDK_LibraryPath_x64);.

For both Include Directories and Library Directories, if you click on * instead of *, you should see at the bot side those inherited path roots.

Hope this helps someone.

Best Regards

more ▼

answered May 20 '15 at 01:06 PM

avatar image

56 2 5 26

avatar image amirea Oct 23 '17 at 12:49 PM
  1. At your suggested step 1, when I press open in Visual Studio button it does nothing.

  2. When I open the folder project in VS 2017 from explorer, r-clicking on the root folder in solution explorer, yields no properties. Same about the .uproject.

avatar image Bitwaker Dec 01 '18 at 11:56 AM

I don't see "Include directories" from the properties window.

avatar image sziócépfijuka Apr 15 '19 at 01:05 PM

I did not have dropdown menu so i copy pasted the suff you wrote but it still doenst work. Any other ideas?

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

Have you installed Windows 8.1 SDK?


  1. Install DirectX runtime

  2. Install Windows 8.1 SDK

  3. Install Visual studio 2013 (pro or community)

  4. Try compiling now.

If this still does not work, try re-installing UE4 - Sometimes UE4 fails to detect 8.1 SDK if it was installed later.

more ▼

answered May 20 '15 at 02:57 AM

avatar image

3.4k 154 52 271

avatar image jjimenezg93 May 20 '15 at 10:17 AM

Yes, I have installed Windows SDK for Windows 8.1.

Currently uninstalling UE4, I'll do it using Advanced uninstaller PRO to check anything is left in the registry or wherever else.

Will update answer after trying. Thanks

EDIT: Updated question, it didn't work...

avatar image grandcoders.com Sep 20 '16 at 11:42 PM

thank you, this has actually solved the issue from 4.11 in 4.13.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

this happened to me, because i installed msvs AFTER making a BP project. after making a source file C++ class inside my bp project, i deleted saved and intermediates from the bp project. after deleting data and cooked info it worked for me. 4.8.13 here 3/22/2018. 5 am

more ▼

answered Mar 22 '18 at 09:01 AM

avatar image

9 3 3

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question