Compile Failed when creating Cpp project
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
Performing 7 actions (9 in parallel)
[2/7] Resource PCLaunch.rc
[3/7] Resource ModuleVersionResource.rc.inl
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:
After clicking 'Yes', I am greeted with this message:
So I go back into Visual Studio, right-click on the project and select Build, after which I am confronted with the following errors:
At this point I am unsure how to proceed. Please Help!
asked Jul 01 '16 at 10:10 PM in C++ Programming
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.
answered Jul 01 '16 at 10:25 PM
Jamie Dale STAFF
Follow this question
Once you sign in you will be able to subscribe for any updates here