how can i solve Microsoft.MakeFile.targets(44, 5): [MSB3073]

i tried to create a new unreal c++ project, and after creating the project, i tried to run c++ code, and i get this error, i see this error a lot of the times when working with c++, and idk how i can solve it really

Microsoft.MakeFile.targets(44, 5): [MSB3073] The command “C:\Unreal\UE_5.0\Engine\Build\BatchFiles\Build.bat INVENTORYCPPEditor Win64 Development -Project=“D:\UnrealProject\InventoryC++\InventoryCpp\INVENTORYCPP.uproject” -WaitMutex -FromMsBuild” exited with code 6.

3 Likes

Hi @emir143 ,

as far as I know, these error code usually happen when there is something wrong / not valid about your code. So, I think that kind of information is not descriptive enough to solve the problem.

Can you give us more detail about the error output? you can just copy the full error output too (usually you can find the error there)

2 Likes

it didnt show me a lot of information other then i should press CTRL + ALT + f11 and then i did that, it didnt show me any error but just showed me that is nothing from. although i managed to fix it by just closing the Unreal Engine and re-opening it in IDE, till next time, it happens, any tips maybe on how i can find solution to this code, cus i know that it has happen a lot on me where when i double click on the error it shows me code in “Microsoft.MakeFile.target”

and the error points to this code. its in line 44

I see, so the case is like fake error right? it successfully compiled from the editor, but its fail in the VS?

I don’t know the specific solution through this problem, however, you can try to delete your Intermediate and .sln files, after then you can regenerate visual studio project file by right clicking the .uproject and select Generate VS project file. Although I don’t know if that will fix the problem or not (but If i meet a fake error, I usually do this).

ok so i got it again and this is what i get this time

idk how well you can see it, but just in case i can copy and paste it as well

unresolved external symbol “public: virtual void __cdecl UInventoryCppComponent::SetupPlayerInputComponent(class UInputComponent *)” (?SetupPlayerInputComponent@UInventoryCppComponent@@UEAAXPEAVUInputComponent@@@Z)

unresolved external symbol “public: virtual void __cdecl UInventoryCppComponent::SetupPlayerInputComponent(class UInputComponent *)” (?SetupPlayerInputComponent@UInventoryCppComponent@@UEAAXPEAVUInputComponent@@@Z)

unresolved external symbol “protected: void __cdecl AINVENTORYCPPCharacter::ToggleInventory(void)” (?ToggleInventory@AINVENTORYCPPCharacter@@IEAAXXZ) referenced in function “protected: virtual void __cdecl AINVENTORYCPPCharacter::SetupPlayerInputComponent(class UInputComponent *)” (?SetupPlayerInputComponent@AINVENTORYCPPCharacter@@MEAAXPEAVUInputComponent@@@Z)

2 unresolved externals

Microsoft.MakeFile.targets(44, 5): [MSB3073] The command “C:\Unreal\UE_5.0\Engine\Build\BatchFiles\Build.bat INVENTORYCPPEditor Win64 Development -Project=“D:\UnrealProject\InventoryC++\INVENTORYCPP\INVENTORYCPP.uproject” -WaitMutex -FromMsBuild” exited with code 6.

im not sure again how i can get more information then this and i tried to do the thing you told me to do, but it give me this error still

From the output, I guess there is something wrong within your ToggleInventory function or inside the SetupPlayerInput…

Could you check have you already define that function and bind it properly? you can copy your .h and .cpp too here that related to SetupPlayerInput and ToggleInventory.

oh ye, i have already defined it.

so by my understanding of this error, this error only shows up when there is like duplicated code?

There are some cases that you can trigger this unresolved external or this kind of error:

  1. You have the function in .h but forgot to create it in .cpp but you bind it in player input / somewhere else. Example:
Creating library D:\Game Development - C++\Mercenarian\UnrealProject\Mercenarian\Binaries\Win32\Mercenarian.lib and object D:\Game Development - C++\Mercenarian\UnrealProject\Mercenarian\Binaries\Win32\Mercenarian.exp
1>MercenarianCharacter.cpp.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall AMercenarianCharacter::Jump(void)" (?Jump@AMercenarianCharacter@@MAEXXZ)
1>Module.Mercenarian.gen.2_of_4.cpp.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall AMercenarianCharacter::Jump(void)" (?Jump@AMercenarianCharacter@@MAEXXZ)
1>D:\Game Development - C++\Mercenarian\UnrealProject\Mercenarian\Binaries\Win32\Mercenarian.exe : fatal error LNK1120: 1 unresolved externals
1>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.MakeFile.Targets(44,5): error MSB3073: The command ""C:\Program Files\Epic Games\UE_4.27\Engine\Build\BatchFiles\Build.bat" Mercenarian Win32 Development -Project="D:\Game Development - C++\Mercenarian\UnrealProject\Mercenarian\Mercenarian.uproject" -WaitMutex -FromMsBuild" exited with code 6.
1>Done building project "Mercenarian.vcxproj" -- FAILED.

That error above was occured because I have declared Jump function in .h but not in the .cpp file and I Bind it in the player input

	PlayerInputComponent->BindAction("Jump", IE_Pressed, this, &AMercenarianCharacter::Jump);

If the unresolved external error show you the function name, then the error is around that function. (In my case, there is AMercenarianCharacter::Jump in the output, and that is the function that causing my error).

  1. You forgot / haven’t add dependecy that already used in your code. Example:
Error	LNK2019	unresolved external symbol "__declspec(dllimport) public: static class UClass * __cdecl UUserWidget::StaticClass(void)" (__imp_?StaticClass@UUserWidget@@SAPEAVUClass@@XZ) referenced in function "class UUserWidget * __cdecl CreateWidget<class UUserWidget>(class UWorld *,class UClass *)" (??$CreateWidget@VUUserWidget@@@@YAPEAVUUserWidget@@PEAVUWorld@@PEAVUClass@@@Z)

In the error above, I want to use CreateWidget function but after compile it, those unresolved external symbol comes up. To fix that you need to include the dependency module needed for Widget related stuff in yourProject.Build.cs file. You can find what module you need to add by simply searching in the unreal documentation.
In this case: UUserWidget | Unreal Engine Documentation
in the Reference, you can find module that you needed.

I think there are more than two of I list above that will cause unresolved external errors, but the most unresolved external that I met usually in that case. If you meet other unresolved external, better carefully read the output and look for some hint there like the class name, functtion name or related.

I hope you fix your problem!

I deleted sln file and regenated it again, it worked…

1 Like

I have the same error, I’m a newbie and I’m doing a tutorial. I noticed that the problem is type target. If the line contains Type = TargetType.Server; I get this error if I change Type = TargetType.Game; works fine, but I mean compiling Server

I’ve done dozens of tutorials, read the documentation for dedicated servers, created several different projects and it always crashes the same error Microsoft.MakeFile.targets(44): [MSB3073] when compiling the server. Could some smart head help me with this error ?? please

@Solandon in my experiance is that when you create unreal project, the c++ and unreal project will open, so when you run the c++ code, that is the error it shows, so basically just close unreal engine and run the c++. if that is not it then not sure

or it could be a code your forgetting to edit (code that is not needed like public begin play)

1 Like

I spent over 48 hours to remove this error. I don’t know, but it should be simple. I do not recommend the development environment

same issue as you.
my engine version is 5.2
My solution is

  1. run setup.bat to make sure every file we have

  2. run GenerateProjectfiles.bat to get new sln file

  3. delete

Engine\Plugins\Runtime\Database\ADOSupport\Intermediate\Build\Win64\x64\UnrealEditor\Development\ADOSupport

and build by Rider, it works!

1 Like

how did you remove it?

im having this issue trying to build on 5.3.1 source…any fixes?

I have same problem!!!
My engine version is 5.1 and I run Hololens-ResearchMode-Unreal project(HL2App) downloaded from Microsoft github.
When I run the project I have this problem.
So I deleted sln file and regenerated it again, but it didn’t work.
I don’t know what should I do. Help me please.

this solved me. Thanks. UE 5.3

朋友,你的方法十分有效

yes,it’s useful.