UE4.26 Error "The Project Could Not Be Compiled" when trying to build a C++ third person project

Hello! I am very new to Unreal and am simply trying to load up a C++ based Third Person project after playing around with Blueprints. After attempting to create this file, this is the error that I have:

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

Running C:/Program Files/Epic Games/UE_4.26/Engine/Binaries/DotNET/UnrealBuildTool.exe Development Win64 -Project=“C:/Users/hezil/Desktop/I Make Games/In Unreal Engine/To Learn Stuff/Play Projects/cpp/cpp.uproject” -TargetType=Editor -Progress -NoEngineChanges -NoHotReloadFromIDE Creating makefile for cppEditor (no existing makefile) @progress](https://answers.unrealengine.com/users/606596/progressifff.html) push 5% Parsing headers for cppEditor
Running UnrealHeaderTool “C:\Users\hezil\Desktop\I Make Games\In Unreal Engine\To Learn Stuff\Play Projects\cpp\cpp.uproject” “C:\Users\hezil\Desktop\I Make Games\In Unreal Engine\To Learn Stuff\Play Projects\cpp\Intermediate\Build\Win64\cppEditor\Development\cppEditor.uhtmanifest” -LogCmds=“loginit warning, logexit warning, logdatabase error” -Unattended -WarningsAsErrors -abslog=“C:\Users\hezil\AppData\Local\UnrealBuildTool\Log_UHT.txt” -installed C:/Program Files/Epic Games/UE_4.26/Engine/Source/Runtime/Engine/Classes/GameFramework/PlayerStart.h(1): Error: Class ‘FProperty’ must inherit UObject or a UObject-derived class Error: Couldn’t find parent type for ‘AutoDestroySubsystem’ named ‘UWorldSubsystem’ in current module (Package: /Script/Engine) or any other module parsed so far.

I have browsed the internet and tried the following things to no avail:

  • Delete .vs, Intermediate, Saved, and cpp.sl files and then Generate Visual Studio Files. Says that it fails to load and asks me to rebuild from source manually
  • Reinstall Windows SDK. Did nothing.
  • Add the intermediate include directories to the NMakeIncludeSearchPath property in Visual Studio. Did nothing.
  • Add $(VC_IncludePath);$(WindowsSDK_IncludePath); to the Include Directories and Library Directories. Also did nothing
  • Build from Visual Studio. Didn’t work; in the console, I got the errors mentioned above…: Error Class ‘FProperty’ must inherit UObject or a UObject-derived class cpp C:\Program Files\Epic Games\UE_4.26\Engine\Source\Runtime\Engine\Classes\GameFramework\PlayerStart.h 1
    Error Couldn’t find parent type for ‘AutoDestroySubsystem’ named ‘UWorldSubsystem’ in current module (Package: /Script/Engine) or any other module parsed so far. cpp C:\Users\hezil\Desktop\I Make Games\In Unreal Engine\To Learn Stuff\Play Projects\cpp\Intermediate\ProjectFiles\EXEC 1
    Error MSB3073 The command ““C:\Program Files\Epic Games\UE_4.26\Engine\Build\BatchFiles\Build.bat” cppEditor Win64 Development -Project=“C:\Users\hezil\Desktop\I Make Games\In Unreal Engine\To Learn Stuff\Play Projects\cpp\cpp.uproject” -WaitMutex -FromMsBuild” exited with code 6. cpp C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.MakeFile.Targets 46
  • …as well as 14024 more errors, the first couple dozen stating that none of the source files can be located: Severity Code Description Project File Line Suppression State Error (active) E1696 cannot open source file “UBT_COMPILED_PLATFORM/UBT_COMPILED_PLATFORMCriticalSection.h” UE4 C:\Program Files\Epic Games\UE_4.26\Engine\Source\Runtime\Core\Public\HAL\CriticalSection.h 7
    Error (active) E1696 cannot open source file “UBT_COMPILED_PLATFORM/UBT_COMPILED_PLATFORMPlatformCompilerPreSetup.h” UE4 C:\Program Files\Epic Games\UE_4.26\Engine\Source\Runtime\Core\Public\HAL\Platform.h 85
    Error (active) E1696 cannot open source file “UBT_COMPILED_PLATFORM/UBT_COMPILED_PLATFORMPlatform.h” UE4 C:\Program Files\Epic Games\UE_4.26\Engine\Source\Runtime\Core\Public\HAL\Platform.h 139

Does anyone else know how to solve this problem? Thank you!

hey man so i have the same problem as you. i was wondering if you fixed it? if so how?

I am also getting this. I recently ran low on disk space on my SSD . Perhaps this is related.

Hey, for anyone who still has this issue, for me there was an issue with the installation process. I unfortunately had to reinstall Unreal Engine itself as well as the Visual Studio C++ module at the time. It might have had something to do with me installing visual studio first without the Windows SDK and therefore messing up the dependencies. It’s been a while since I had this issue and have moved on to UE5 since, but hopefully this helps for anyone who was stuck for days like I was.

I had this error with UE 5.3 and I can confirm that missing the Windows SDK Visual Studio module was the problem. Just opened the installer, clicked modify and added Windows 10 SDK (the correct one).

Ohh and I also added “Unreal Engine installer” and “Unreal Engine Test Adapter” in the VS installer just to be safe.