C++ can't compile and I can't open UE4 now

I have a blueprint project and I created a C++ Class in the project and then it gave me an error saying UE4 Engine compile error and the engine can’t compile and then i restarted UE4 and now i am locked out of my project because the Engine can’t compile.

1 Like

When you open the .sln file and try to build in Visual Studio, can you build successfully? A lot of times the Editor won’t open/compile if there’s an error in the c++ files.

The editor fails to compile about 99% of the time. Open the project’s solution file (.sln) and press F5 to compile. If you don’t have a .sln file, you can right click on your project’s .uproject file and hit Generate Visual Studio project files. Also, make sure that the class you added has no errors. If I make a new C++ class, and it isn’t inside the root folder (“Source/ProjectName/”) I usually have to fix the include path for that class.

So for example if I create a new actor “MyTestActor” inside “Source/ProjectName/SomeFolder/” folder, then I have to change the .cpp of this class:



// From:
#include MyTestActor.h

// To:
#include SomeFolder/MyTestActor.h


I had a lot of issues with this when I was starting out, so hopefully this helps!

It has some Engine code error not my code error, and i don’t know how to fix this, i tried bUseUnityMode = false and it still didn’t work.
Firstly it a message pops up and it says “Missing ProjectName Modules
The following modules are missing or built with a different engine version bla bla bla…”
I click yes and then it compiles and it has an error while compiling


 E:\Program Files\Epic Games\UE_4.26\Engine\Source\Runtime\Core\Public\Templates/Tuple.h(620): error C3520: "ArgTypes": In diesem Kontext muss das Parameterpaket erweitert werden
E:\Program Files\Epic Games\UE_4.26\Engine\Source\Runtime\Core\Public\Templates/UnrealTemplate.h(626): note: Siehe Verweis auf die Instanziierung der gerade kompilierten Funktions-Vorlage "T &&DeclVal(void)".
E:\Program Files\Epic Games\UE_4.26\Engine\Source\Runtime\Core\Public\Math/IntPoint.h(557): note: Siehe Verweis auf die Klasse Vorlage-Instanziierung "TTuple<>", die kompiliert wird.
E:\Program Files\Epic Games\UE_4.26\Engine\Source\Runtime\Core\Public\Templates/Tuple.h(620): error C2672: "DeclVal": keine ?bereinstimmende ?berladene Funktion gefunden
E:\Program Files\Epic Games\UE_4.26\Engine\Source\Runtime\Core\Public\Templates/Tuple.h(620): error C2893: Funktionsvorlage "T &&DeclVal(void)" konnte nicht spezialisiert werden
E:\Program Files\Epic Games\UE_4.26\Engine\Source\Runtime\Core\Public\Templates/Tuple.h(620): note: Mit den folgenden Vorlagenargumenten:
E:\Program Files\Epic Games\UE_4.26\Engine\Source\Runtime\Core\Public\Templates/Tuple.h(620): note: "T=ArgTypes &&"
E:\Program Files\Epic Games\UE_4.26\Engine\Source\Runtime\Core\Public\Templates/Tuple.h(620): error C3546: "...": Es sind keine zu erweiternden Parameterpakete verf?gbar.
E:\Program Files\Epic Games\UE_4.26\Engine\Source\Runtime\Core\Public\Templates/Tuple.h(620): error C2672: "UE4Tuple_Private::ConstructibleConceptCheck": keine ?bereinstimmende ?berladene Funktion gefunden
E:\Program Files\Epic Games\UE_4.26\Engine\Source\Runtime\Core\Public\Templates/Tuple.h(629): error C3520: "OtherTypes": In diesem Kontext muss das Parameterpaket erweitert werden
E:\Program Files\Epic Games\UE_4.26\Engine\Source\Runtime\Core\Public\Templates/UnrealTemplate.h(626): note: Siehe Verweis auf die Instanziierung der gerade kompilierten Funktions-Vorlage "T &&DeclVal(void)".
E:\Program Files\Epic Games\UE_4.26\Engine\Source\Runtime\Core\Public\Templates/Tuple.h(629): error C2672: "DeclVal": keine ?bereinstimmende ?berladene Funktion gefunden
E:\Program Files\Epic Games\UE_4.26\Engine\Source\Runtime\Core\Public\Templates/Tuple.h(629): error C2893: Funktionsvorlage "T &&DeclVal(void)" konnte nicht spezialisiert werden
E:\Program Files\Epic Games\UE_4.26\Engine\Source\Runtime\Core\Public\Templates/Tuple.h(629): note: Mit den folgenden Vorlagenargumenten:
E:\Program Files\Epic Games\UE_4.26\Engine\Source\Runtime\Core\Public\Templates/Tuple.h(629): note: "T=OtherTypes &&"
E:\Program Files\Epic Games\UE_4.26\Engine\Source\Runtime\Core\Public\Templates/Tuple.h(629): error C3546: "...": Es sind keine zu erweiternden Parameterpakete verf?gbar.
E:\Program Files\Epic Games\UE_4.26\Engine\Source\Runtime\Core\Public\Templates/Tuple.h(629): error C2672: "UE4Tuple_Private::ConstructibleConceptCheck": keine ?bereinstimmende ?berladene Funktion gefunden
E:\Program Files\Epic Games\UE_4.26\Engine\Source\Runtime\Core\Public\Templates/Tuple.h(638): error C3520: "OtherTypes": In diesem Kontext muss das Parameterpaket erweitert werden
E:\Program Files\Epic Games\UE_4.26\Engine\Source\Runtime\Core\Public\Templates/UnrealTemplate.h(626): note: Siehe Verweis auf die Instanziierung der gerade kompilierten Funktions-Vorlage "T &&DeclVal(void)".
E:\Program Files\Epic Games\UE_4.26\Engine\Source\Runtime\Core\Public\Templates/Tuple.h(638): error C2672: "DeclVal": keine ?bereinstimmende ?berladene Funktion gefunden
E:\Program Files\Epic Games\UE_4.26\Engine\Source\Runtime\Core\Public\Templates/Tuple.h(638): error C2893: Funktionsvorlage "T &&DeclVal(void)" konnte nicht spezialisiert werden
E:\Program Files\Epic Games\UE_4.26\Engine\Source\Runtime\Core\Public\Templates/Tuple.h(638): note: Mit den folgenden Vorlagenargumenten:
E:\Program Files\Epic Games\UE_4.26\Engine\Source\Runtime\Core\Public\Templates/Tuple.h(638): note: "T=const OtherTypes &"
E:\Program Files\Epic Games\UE_4.26\Engine\Source\Runtime\Core\Public\Templates/Tuple.h(638): error C3546: "...": Es sind keine zu erweiternden Parameterpakete verf?gbar.
E:\Program Files\Epic Games\UE_4.26\Engine\Source\Runtime\Core\Public\Templates/Tuple.h(638): error C2672: "UE4Tuple_Private::ConstructibleConceptCheck": keine ?bereinstimmende ?berladene Funktion gefunden
E:\Program Files\Epic Games\UE_4.26\Engine\Source\Runtime\Core\Public\Templates/Tuple.h(653): error C3520: "OtherTypes": In diesem Kontext muss das Parameterpaket erweitert werden
E:\Program Files\Epic Games\UE_4.26\Engine\Source\Runtime\Core\Public\Templates/UnrealTemplate.h(626): note: Siehe Verweis auf die Instanziierung der gerade kompilierten Funktions-Vorlage "T &&DeclVal(void)".
E:\Program Files\Epic Games\UE_4.26\Engine\Source\Runtime\Core\Public\Templates/Tuple.h(653): error C2672: "DeclVal": keine ?bereinstimmende ?berladene Funktion gefunden
E:\Program Files\Epic Games\UE_4.26\Engine\Source\Runtime\Core\Public\Templates/Tuple.h(653): error C2893: Funktionsvorlage "T &&DeclVal(void)" konnte nicht spezialisiert werden
E:\Program Files\Epic Games\UE_4.26\Engine\Source\Runtime\Core\Public\Templates/Tuple.h(653): note: Mit den folgenden Vorlagenargumenten:
E:\Program Files\Epic Games\UE_4.26\Engine\Source\Runtime\Core\Public\Templates/Tuple.h(653): note: "T=const OtherTypes &"
E:\Program Files\Epic Games\UE_4.26\Engine\Source\Runtime\Core\Public\Templates/Tuple.h(653): error C3546: "...": Es sind keine zu erweiternden Parameterpakete verf?gbar.
E:\Program Files\Epic Games\UE_4.26\Engine\Source\Runtime\Core\Public\Templates/Tuple.h(653): error C2672: "UE4Tuple_Private::AssignableConceptCheck": keine ?bereinstimmende ?berladene Funktion gefunden
E:\Program Files\Epic Games\UE_4.26\Engine\Source\Runtime\Core\Public\Templates/Tuple.h(663): error C3520: "OtherTypes": In diesem Kontext muss das Parameterpaket erweitert werden
E:\Program Files\Epic Games\UE_4.26\Engine\Source\Runtime\Core\Public\Templates/UnrealTemplate.h(626): note: Siehe Verweis auf die Instanziierung der gerade kompilierten Funktions-Vorlage "T &&DeclVal(void)".
E:\Program Files\Epic Games\UE_4.26\Engine\Source\Runtime\Core\Public\Templates/Tuple.h(663): error C2672: "DeclVal": keine ?bereinstimmende ?berladene Funktion gefunden
E:\Program Files\Epic Games\UE_4.26\Engine\Source\Runtime\Core\Public\Templates/Tuple.h(663): error C2893: Funktionsvorlage "T &&DeclVal(void)" konnte nicht spezialisiert werden
E:\Program Files\Epic Games\UE_4.26\Engine\Source\Runtime\Core\Public\Templates/Tuple.h(663): note: Mit den folgenden Vorlagenargumenten:
E:\Program Files\Epic Games\UE_4.26\Engine\Source\Runtime\Core\Public\Templates/Tuple.h(663): note: "T=OtherTypes &&"
E:\Program Files\Epic Games\UE_4.26\Engine\Source\Runtime\Core\Public\Templates/Tuple.h(663): error C3546: "...": Es sind keine zu erweiternden Parameterpakete verf?gbar.
E:\Program Files\Epic Games\UE_4.26\Engine\Source\Runtime\Core\Public\Templates/Tuple.h(663): error C2672: "UE4Tuple_Private::AssignableConceptCheck": keine ?bereinstimmende ?berladene Funktion gefunden
E:\Program Files\Epic Games\UE_4.26\Engine\Source\Runtime\Core\Public\Delegates/DelegateInstancesImpl.h(365): error C2338: You cannot use raw method delegates with UObjects.
E:\Program Files\Epic Games\UE_4.26\Engine\Source\Runtime\Core\Public\Delegates/DelegateInstancesImpl.h(493): note: Siehe Verweis auf die Klasse Vorlage-Instanziierung "TBaseRawMethodDelegateInstance<bConst,UserClass,WrappedRetValType(ParamTypes...),UserPolicy,VarTypes...>", die kompiliert wird.
E:\Program Files\Epic Games\UE_4.26\Engine\Source\Runtime\Core\Public\Misc/StringBuilder.h(354): error C2995: "unknown-type operator <<(FWideStringBuilderBase &,T &&)": Funktionsvorlage wurde bereits definiert.
E:\Program Files\Epic Games\UE_4.26\Engine\Source\Runtime\Core\Public\Misc/StringBuilder.h(345): note: Siehe Deklaration von "operator <<"
E:\Program Files\Epic Games\UE_4.26\Engine\Source\Runtime\RHI\Public\RHI.h(2018): error C2327: "FRHITransition::State": Ist kein Typname, nicht statisch und kein Enumerator
E:\Program Files\Epic Games\UE_4.26\Engine\Source\Runtime\RHI\Public\RHI.h(2018): error C2065: "State": nichtdeklarierter Bezeichner

The errors are german and i use Visual Studio 2017

Can somebody help me?

Try going into the epic games launcher, and verifying your UE engine (there should be an arrow or smt beside UE); I did that yesterday when I accidently edited source files, and everything worked as a charm.

Ok, I am trying verifying Unreal Engine 4.26.1

Still error after verifying:
“Error”
“Projectname could not be compiled. Try rebuilding from source manually.”

So you created a C++ class, failed to compile, then restarted UE4? If this is the case, you won’t be able to launch the editor again until you have a successful compile. If you added a class which introduced a compile error, delete the class header/source, regenerate the project and build your solution.

You can also check out the last good commit for your project and rebuild from there. If you aren’t using version control, this is one good reason why you should start.

I had a quite similar problem just now, whitch made me feel distressed.
But, I fixed it successfully.
My UE version is 4.26.2.

  1. make sure your vitual studio version is up than 2017

  2. install :Windows SDK 10.0.18362
    NET 4.6.2 Targeting Pack
    NET 4.6.2 SDK
    (which can be install in vitual studio installer)

3.open your project folder in browser, right click on your project’s .uproject file and hit Generate Visual Studio project files.

and then,you can open your project successfully. :grinning:

This happend to me… my problem was due to File access permissions when i created the C++ class and it errored on compile and i restarted with it giving me the error saying rebuild manuely. Now all i had to do was Set the the whole project Writable my one is read only due to me using Perforce as a source control.