Error creating new c++ project

When I try the first programming tutorial as per link here https://docs.unrealengine.com/latest/INT/Programming/QuickStart/2/index.html, I got this error.

This is whats stated in the dialog box

Running D:/Epic Games/4.9/Engine/Binaries/DotNET/UnrealBuildTool.exe Quickstart Development Win64 -project="D:/Unreal/4.9.2/Quickstart/Quickstart.uproject" -rocket -editorrecompile -progress -noubtmakefiles
@progress push 5%
Parsing headers for QuickstartEditor
  Running UnrealHeaderTool "D:/Unreal/4.9.2/Quickstart/Quickstart.uproject" "D:\Unreal\4.9.2\Quickstart\Intermediate\Build\Win64\QuickstartEditor\Development\UnrealHeaderTool.manifest" -LogCmds="loginit warning, logexit warning, logdatabase error" -rocket -installed
Reflection code generated for QuickstartEditor in 8.6960996 seconds
@progress pop


ERROR: UBT ERROR: Failed to produce item: D:\Unreal\4.9.2\Quickstart\Binaries\Win64\UE4Editor-Quickstart.dll
XGE execution time: 14.32 seconds

This is the contents when I press the copy button in the dialog box.

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

Running D:/Epic
Games/4.9/Engine/Binaries/DotNET/UnrealBuildTool.exe
Quickstart Development Win64
-project=“D:/Unreal/4.9.2/Quickstart/Quickstart.uproject”
-rocket -editorrecompile -progress -noubtmakefiles @progress push 5% Parsing headers for QuickstartEditor
Running UnrealHeaderTool
“D:/Unreal/4.9.2/Quickstart/Quickstart.uproject”
“D:\Unreal\4.9.2\Quickstart\Intermediate\Build\Win64\QuickstartEditor\Development\UnrealHeaderTool.manifest”
-LogCmds=“loginit warning, logexit warning, logdatabase error” -rocket
-installed Reflection code generated for QuickstartEditor in 8.7618898
seconds @progress pop

ERROR: UBT ERROR: Failed to produce
item:
D:\Unreal\4.9.2\Quickstart\Binaries\Win64\UE4Editor-Quickstart.dll
XGE execution time: 14.32 seconds

I did exactly what the tutorial does.

There is an option for open in Visual Studio. In Visual Studio 2013, I tried Build Solution(with default settings). This are the errors that I get.

Error 1 error : Failed to produce
item:
D:\Unreal\4.9.2\Quickstart\Binaries\Win64\UE4Editor-Quickstart.dll D:\Unreal\4.9.2\Quickstart\Intermediate\ProjectFiles\ERROR Quickstart
Error 2 error MSB3073: The command
““D:\Epic
Games\4.9\Engine\Build\BatchFiles\Build.bat” QuickstartEditor Win64 Development
“D:\Unreal\4.9.2\Quickstart\Quickstart.uproject”
-rocket -waitmutex” exited with code -1. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.MakeFile.Targets 38 5 Quickstart

This are the line that produces error in Visual Studio 2013

<Exec Command="$(NMakeBuildCommandLine)"  Condition="'$(NMakeBuildCommandLine)'!=''"/>

Whats wrong and what should i do?

There is probably more to that output then just that, can you attach a text file with the whole output here? This could help finding your issue.

Im not sure about the text file. I cant seem to find such text file. I have updated the question with VIsual studio 2013 output.

Hey ijam_j-

Just to make sure I understand, you created a new project and then received this error when you tried to add a new class to it, correct? Was anything else added to the project before attempting to add a new class? Does the same message appear if you add a class to another project?

Cheers

Actually, it happens on the first page of the tutorial. https://docs.unrealengine.com/latest/INT/Programming/QuickStart/1/index.html
The error emerge after pressing the create project button.

I have reinstalled Epic Launcher, Visual studio 2013 and Visual studio 2015 (in that order), but the problem still persist. The problem also happens when i tried to create fps project (or any other project template). There is no problem when creating blueprint project.

I tried creating project with ue4.8, same errors.

The error seems to relate to NMakeBuildCommandLine.

Do I have to format my pc?

Im stuck here.

I tried to trace NMakeBuildCommandLine. I find the reference at

D:\Unreal\4.9.2\Quickstart\Intermediate\ProjectFiles\Quickstart.vcxproj

Theres a line that refers to NMakeBuildCommandLine

<NMakeBuildCommandLine>"D:\Epic Games\4.9\Engine\Build\BatchFiles\Build.bat" MyProject Win32 DebugGame "$(SolutionDir)$(ProjectName).uproject" -rocket -waitmutex</NMakeBuildCommandLine>

I can confirm that Build.bat exist in that folder.

I have uninstalled UE4 and reinstalled UE4. I have updated to UE4 4.10.0 and still have the same errors.

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

Running D:/Epic Games/4.10/Engine/Binaries/DotNET/UnrealBuildTool.exe Quickstart Development Win64 -project="D:/Users//Documents/Unreal Projects/4.10.0/Quickstart/Quickstart.uproject" -rocket -editorrecompile -progress -noubtmakefiles -2015
@progress push 5%
Parsing headers for QuickstartEditor
  Running UnrealHeaderTool "D:/Users//Documents/Unreal Projects/4.10.0/Quickstart/Quickstart.uproject" "D:\Users\\Documents\Unreal Projects\4.10.0\Quickstart\Intermediate\Build\Win64\QuickstartEditor\Development\UnrealHeaderTool.manifest" -LogCmds="loginit warning, logexit warning, logdatabase error" -rocket -installed
Reflection code generated for QuickstartEditor in 8.6969882 seconds
@progress pop


ERROR: UBT ERROR: Failed to produce item: D:\Users\\Documents\Unreal Projects\4.10.0\Quickstart\Binaries\Win64\UE4Editor-Quickstart.dll
XGE execution time: 41.97 seconds

Can somebody help me?

Hi ijam_j,

Some users have reported similar issues that were caused by their anti-virus software interfering with the UnrealBuildTool when compiling code. Could you please try temporarily disabling your anti-virus software and then create the project again?

This needs to be promoted more as a possible solution!

After hours of re installations of both Unreal Engine and Visual Studio this simple fix solved all my problems with creating a C++ project in 4.10.

~Per “” Johansson

Doenst work on my end. Im using windows defender and after disabling it, i still cant create the dll file.

Could you please download this file to your desktop, remove the .txt extension, then run the file? It will create a new info.txt file that contains some information about your Visual Studio installation. Please upload that back here so we can take a look.

Even after reformatting, UE4 fails to build. Turns out i need to disable real time monitoring of Windows Defender(antivirus that i used) before compiling. after that, compile works.

Tried this and still didn’t work.

Hi ViTaLC0D3R,

Could you please paste the error messages that you are receiving?

My anti-virus McAfee is expired and I do have the same problem. Should I temporary uninstall it from the computer? It should not matter if I do it since it is expired. What should I do?

Also I would like to know if the following anti-viruses: Byte-Fence Anti-Malware and Avast-Free Antivirus would cause the same problem since they are all installed on my computer.

Thanks in advance