Unable to build C++ project "error MSB3073"

Hi,
I’m fairly new to UE4 and tried setting up a project for C++ code for the first time today, but UE4 fails to build the project:

320776-error.png

So I open the .sln file in VS and this is the error message that I get when trying to build it there:

1>------ Build started: Project: TestProject, Configuration: Development_Editor x64 ------
1>Building TestProjectEditor...
1>Using Visual Studio 2019 14.27.29112 toolchain (C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110) and Windows 10.0.18362.0 SDK (C:\Program Files (x86)\Windows Kits\10).
1>Building 8 actions with 8 processes...
1>EXEC : [1/8] error : Unable to open C:\Users\Anton\Documents\Unreal Projects\TestProject\Intermediate\Build\Win64\TestProjectEditor\Development\Engine\SharedPCH.Engine.ShadowErrors.h.txt.tmp for output
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.MakeFile.Targets(46,5): error MSB3073: The command "C:\WINDOWS\System32\chcp.com 65001 >NUL 
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.MakeFile.Targets(46,5): error MSB3073:  "C:\Program Files\Epic Games\UE_4.25\Engine\Build\BatchFiles\Build.bat" TestProjectEditor Win64 Development -Project="C:\Users\Anton\Documents\Unreal Projects\TestProject\TestProject.uproject" -WaitMutex -FromMsBuild" exited with code 6.
1>Done building project "TestProject.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

I looked up “error MSB3073” and I guess it might be a problem with one of the paths…?
All the suggested solutions that I could find either went way over my head or were for slightly different problems.

[This post][2] for example talks about a similar error and I did in fact recently update my UE from 4.25 to the current version, but I haven’t really understood the given solution to that post.

I have installed VS according to the [documentation][3].

Any ideas what could be causing the problem?

In my experience, if you have an error starting with “MS,” it means go check all your spelling in the UE macros.

The UPROPERTY() stuff especially seems to get me. I never miss an opportunity to type “categroy” :slight_smile:

Sometimes if you build/rebuild spam it a couple of times, it eventually tells you whatever the typo was because it complains about it in the text somewhere. And, sometimes, even stranger, it just decides to start compiling error-free for you for no reason.

SOLVED

So after many wasted hours of googling around and trying different things, I found that the problem was caused by my antivirus software (Bitdefender).
Microsoft C++ Compiler Driver and Incremental Linker were trying to access files within a protected folder. So I just went into the access permissions settings of Bitdefender and checked those two bad boys and I was good to go.

Hope this saves someone else the bother I had to go through.

2 Likes