# Compile Failed when creating Cpp project

**URL:** <https://forums.unrealengine.com/t/compile-failed-when-creating-cpp-project/362697>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine\
**Created:** [July 1, 2016, 10:10pm UTC](https://forums.unrealengine.com/t/compile-failed-when-creating-cpp-project/362697 "2016-07-01T22:10:32Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tasty\_Snak](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/tasty_snak/32/550507_2.png) [@Tasty\_Snak](https://forums.unrealengine.com/u/Tasty_Snak)\
**Post date:** [July 1, 2016, 10:10pm UTC](https://forums.unrealengine.com/t/compile-failed-when-creating-cpp-project/362697/1 "2016-07-01T22:10:32Z")

</div>

I recently updated Visual Studio to include all the Android SDK’s as I was having problems getting a VR project to work on my Nexus 6. This solved that particular problem in a blueprints project, but when creating a Cpp project I get an error and the project doesn’t even open! Below is the message that is returned:

* * *

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

Running F:/Programs/GameDevTools/Epic Games/4.12/Engine/Binaries/DotNET/UnrealBuildTool.exe MyProject Development Win64 -project=“E:/Programs/Game Creation Tools/Epic Games/UE4/Projects/VR\_Cpp\_Temp3/MyProject/MyProject.uproject” -editorrecompile -progress -noubtmakefiles -NoHotReloadFromIDE

@progress push 5%

Parsing headers for MyProjectEditor

Running UnrealHeaderTool “E:\Programs\Game Creation Tools\Epic Games\UE4\Projects\VR\_Cpp\_Temp3\MyProject\MyProject.uproject” “E:\Programs\Game Creation Tools\Epic Games\UE4\Projects\VR\_Cpp\_Temp3\MyProject\Intermediate\Build\Win64\MyProjectEditor\Development\MyProjectEditor.uhtmanifest” -LogCmds=“loginit warning, logexit warning, logdatabase error” -Unattended -WarningsAsErrors -installed  
Reflection code generated for MyProjectEditor in 3.8302828 seconds

@progress pop

Performing 7 actions (9 in parallel)

[2/7] Resource PCLaunch.rc

[3/7] Resource ModuleVersionResource.rc.inl

PCH.MyProject.h.cpp

MyProjectGameMode.cpp

MyProject.cpp

MyProject.generated.cpp

E:\Programs\Game Creation Tools\Epic Games\UE4\Projects\VR\_Cpp\_Temp3\MyProject\Intermediate\Build\Win64\UE4Editor\Inc\MyProject\MyProject.generated.cpp: error C4599: ‘/IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE’: command line argument number 261 does not match precompiled headerE:\Programs\Game Creation Tools\Epic Games\UE4\Projects\VR\_Cpp\_Temp3\MyProject\Source\MyProject\MyProjectGameMode.cpp: error C4599: ‘/IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE’: command line argument number 261 does not match precompiled headerE:\Programs\Game Creation Tools\Epic Games\UE4\Projects\VR\_Cpp\_Temp3\MyProject\Source\MyProject\MyProject.cpp: error C4599: ‘/IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE’: command line argument number 261 does not match precompiled header

ERROR: UBT ERROR: Failed to produce item: E:\Programs\Game Creation Tools\Epic Games\UE4\Projects\VR\_Cpp\_Temp3\MyProject\Binaries\Win64\UE4Editor-MyProject.dll

Total build time: 43.48 seconds

* * *

After opening it in Visual Studio and waiting for the build to finish, I find that I need to go to the .uproject file in Windows Explorer and double-click it to open the engine. I am greeted with this message:

![96859-vr_temp_3.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/9/d/89dc5678acf39275f2705d0ed33b3a875db2431e.png)

After clicking ‘Yes’, I am greeted with this message:

![96860-vr_temp_3_2.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/0/4/7041183398be086f22ac3f28eb4200381072dad3.png)

So I go back into Visual Studio, right-click on the project and select Build, after which I am confronted with the following errors:

 ![96871-vr_temp_3_3.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/2/f/e2f2a9b0b1420c9419a5fe9d697d2da728af832e.png)

At this point I am unsure how to proceed. Please Help!

---

<div class="post-metadata">

**Author:** ![Jamie\_Dale](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jamie_dale/32/1165413_2.png) [@Jamie\_Dale](https://forums.unrealengine.com/u/Jamie_Dale)\
**Post date:** [July 1, 2016, 10:25pm UTC](https://forums.unrealengine.com/t/compile-failed-when-creating-cpp-project/362697/2 "2016-07-01T22:25:56Z")

</div>

Are you using Visual Studio 2015, Update 3?

That version added a new warning, and we’re accidentally treating it as an error. It has been fixed for the next version of 4.12, but until then you’ll either need to use Update 2, or use GitHub build.

[https://github.com/EpicGames/UnrealEngine/commit/f011bacaaf292ebdc8f33fdeb78bb14d30eaa6bc](https://github.com/EpicGames/UnrealEngine/commit/f011bacaaf292ebdc8f33fdeb78bb14d30eaa6bc)

---

<div class="post-metadata">

**Author:** ![Tasty\_Snak](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/tasty_snak/32/550507_2.png) [@Tasty\_Snak](https://forums.unrealengine.com/u/Tasty_Snak)\
**Post date:** [July 1, 2016, 10:44pm UTC](https://forums.unrealengine.com/t/compile-failed-when-creating-cpp-project/362697/3 "2016-07-01T22:44:26Z")

</div>

I believe I am using Update 3. To revert back to Update 2, will I need to run the Visual Studio executable again and uncheck the appropriate boxes? Or is there a way of doing it by opening Visual Studio?

---

<div class="post-metadata">

**Author:** ![Jamie\_Dale](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jamie_dale/32/1165413_2.png) [@Jamie\_Dale](https://forums.unrealengine.com/u/Jamie_Dale)\
**Post date:** [July 1, 2016, 10:52pm UTC](https://forums.unrealengine.com/t/compile-failed-when-creating-cpp-project/362697/4 "2016-07-01T22:52:09Z")

</div>

I’m not sure actually. I know the installer will only let you install the latest update version, however you might be able to remove Update 3 via Windows Update if this is to be believed (it’s for an older version of VS).

> <https://stackoverflow.com/questions/16557556/how-do-i-uninstall-visual-studio-2012-update-2>

---

<div class="post-metadata">

**Author:** ![Tasty\_Snak](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/tasty_snak/32/550507_2.png) [@Tasty\_Snak](https://forums.unrealengine.com/u/Tasty_Snak)\
**Post date:** [July 1, 2016, 11:07pm UTC](https://forums.unrealengine.com/t/compile-failed-when-creating-cpp-project/362697/5 "2016-07-01T23:07:27Z")

</div>

Thanks Jamie. I think it might be easier just waiting for the next version of 4.12 than messing around with things too much. I’m only just starting out experimenting using VR and a blueprints project works fine, so I think I’ll just do that for now.

---

<div class="post-metadata">

**Author:** ![Jamie\_Dale](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jamie_dale/32/1165413_2.png) [@Jamie\_Dale](https://forums.unrealengine.com/u/Jamie_Dale)\
**Post date:** [July 3, 2016, 5:55pm UTC](https://forums.unrealengine.com/t/compile-failed-when-creating-cpp-project/362697/6 "2016-07-03T17:55:58Z")

</div>

I found another question about this same error, and the comments there do list a way to only install Update 2.

> **[Build Failed with VS 2015 update 3](https://forums.unrealengine.com/questions/435600/build-failed-with-vs-2015-update-3.html)**
>
> It’s because of the following change in VS 2015 RC3: “When using PCH files, mismatched -I include directories to the compiler between -Yc and -Yu compilations will now produce a new warning. C4599” This is getting thrown as an error, even though it...

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_aee5288a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_aee5288a](https://forums.unrealengine.com/u/anonymous_user_aee5288a)\
**Post date:** [July 8, 2016, 11:46pm UTC](https://forums.unrealengine.com/t/compile-failed-when-creating-cpp-project/362697/7 "2016-07-08T23:46:42Z")

</div>

The easiest way to revert to Update 2 is to uninstall Visual Studio, download one of the Update 2 ISOs for example from here: [https://gist.github.com/CHEF-KOCH/8078b39e1aad71ef6c317a3c0edb6ec9](https://gist.github.com/CHEF-KOCH/8078b39e1aad71ef6c317a3c0edb6ec9) and **disable Internet connection** before and during installation process. Note that this way you won’t be able to install some of the additional components.
