Unable to Run my C++ Project

Hi there,

I’m trying to learn C++ and added it to my project. I can package the project successfully, but when I try to run it through my IDE (Rider), I get these error messages, even though I haven’t touched the Pawn class. Could you help me figure out what’s going on?

CONSOLE: C:\Program Files\Epic Games\UE_5.6\Engine\Build\BatchFiles\Build.bat FPS_projectEditor Win64 Development -Project=“C:\Users\winte\Documents\Perforce\FPS_project 5.6\FPS_project.uproject” -WaitMutex -FromMSBuild
0>Using bundled DotNet SDK version: 8.0.300 win-x64
0>Running UnrealBuildTool: dotnet “....\Engine\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll” FPS_projectEditor Win64 Development -Project=“C:\Users\winte\Documents\Perforce\FPS_project 5.6\FPS_project.uproject” -WaitMutex -FromMSBuild
0>Log file: C:\Users\winte\AppData\Local\UnrealBuildTool\Log.txt
0>Building FPS_projectEditor…
0>Using Visual Studio 2022 14.38.33144 toolchain (C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130) and Windows 10.0.22621.0 SDK (C:\Program Files (x86)\Windows Kits\10).
0>[Upgrade]
0>[Upgrade] Using backward-compatible include order. The latest version of UE has changed the order of includes, which may require code changes. The current setting is:
0>[Upgrade] IncludeOrderVersion = EngineIncludeOrderVersion.Unreal5_3
0>[Upgrade] Suppress this message by setting ‘IncludeOrderVersion = EngineIncludeOrderVersion.Unreal5_6;’ in FPS_projectEditor.Target.cs.
0>[Upgrade] Alternatively you can set this to ‘EngineIncludeOrderVersion.Latest’ to always use the latest include order. This will potentially cause compile errors when integrating new versions of the engine.
0>[Upgrade]
0>Determining max actions to execute in parallel (6 physical cores, 12 logical cores)
0> Executing up to 6 processes, one per physical core
0>Using Unreal Build Accelerator local executor to run 8 action(s)
0> Storage capacity 40Gb
0>---- Starting trace: 250822_181025 ----
0>UbaServer - Listening on 0.0.0.0:1345
0>------ Building 8 action(s) started ------
0>UbaSessionServer - cl.exe ERROR: Reserved size of C:\Users\winte\Documents\Perforce\FPS_project 5.6\Intermediate\Build\Win64\x64\FPS_projectEditor\Development\UnrealEd\SharedPCH.UnrealEd.Project.ValApi.ValExpApi.Cpp20.InclOrderUnreal5_3.h.sarif is smaller than what is requested to be. ReserveSize: 33554432 Written: 33497707 Requested: 33559147
0>[1/8] Compile [x64] SharedPCH.UnrealEd.Project.ValApi.ValExpApi.Cpp20.InclOrderUnreal5_3.cpp
0>Pawn.h(43,7): Error C2143 : Syntaxfehler: Es fehlt “;” vor “”
0>class APawn : public AActor, public INavAgentInterface
0> ^
0>Pawn.h(43,13): Error C4430 : Fehlender Typspezifizierer - int wird angenommen. Hinweis: “default-int” wird von C++ nicht unterstützt.
0>class APawn : public AActor, public INavAgentInterface
0> ^
0>Pawn.h(45,2): Error C4430 : Fehlender Typspezifizierer - int wird angenommen. Hinweis: “default-int” wird von C++ nicht unterstützt.
0> GENERATED_BODY()
0> ^
0>SharedPCH.UnrealEd.Project.ValApi.ValExpApi.Cpp20.InclOrderUnreal5_3.cpp(3,1): Error C1083 : Datei (vom Compiler generiert) kann nicht geöffnet werden: “C:/Users/winte/Documents/Perforce/FPS_project 5.6/Intermediate/Build/Win64/x64/FPS_projectEditor/Development/UnrealEd/SharedPCH.UnrealEd.Project.ValApi.ValExpApi.Cpp20.InclOrderUnreal5_3.h.pch”: No such file or directory
0>cl.exe ERROR: Reserved size of C:\Users\winte\Documents\Perforce\FPS_project 5.6\Intermediate\Build\Win64\x64\FPS_projectEditor\Development\UnrealEd\SharedPCH.UnrealEd.Project.ValApi.ValExpApi.Cpp20.InclOrderUnreal5_3.h.sarif is smaller than what is requested to be. ReserveSize: 33554432 Written: 33497707 Requested: 33559147
0>Trace written to file C:/Users/winte/AppData/Local/UnrealBuildTool/Log.uba with size 5.3kb
0>Total time in Unreal Build Accelerator local executor: 22.15 seconds
0>
0>Result: Failed (OtherCompilationError)
0>Total execution time: 22.81 seconds

Hello there @zebr3!

No worries, checking through your log, the errors you are seeing are most likely related to compilation problems, not your code. The warning below is key:

Using backward-compatible include order. The latest version of UE has changed the order of includes, which may require code changes. The current setting is:IncludeOrderVersion = EngineIncludeOrderVersion.Unreal5_3

Suppress this message by setting ‘IncludeOrderVersion = EngineIncludeOrderVersion.Unreal5_6;’ in FPS_projectEditor.Target.cs.`

In order to fix the problem please take the following steps:

  • Open Source/FPS_projectEditor.Target.cs and set the values below:

    DefaultBuildSettings = BuildSettingsVersion.V5;
    IncludeOrderVersion = EngineIncludeOrderVersion.Unreal5_6;
    
  • Close Rider and Unreal Engine completely

  • Delete these folders from your project directory:

    • Binaries
    • Intermediate
    • Saved
    • .vs
  • Right-click on your .uproject file in Windows Explorer

  • Select “Generate Visual Studio project files”

  • Once it’s completed, rename your project folder to remove spaces (for example, FPS_project_5_6)

  • Reopen the project and rebuild from Rider. Hope this helps!