Could not Compile Error? and Build Errors?

Hello,

I am starting c++ in Unreal 5.3, I have installed Visual Studio 2022 and all the associated dependants (I think). However when I build my solution in VS I get these failures and when I relaunch the project I get these errors. I have tried to figure out this problems on my own but I am really lost. The articles I could find that dealt with similar errors seemed to be from ue4 and I couldn’t get it to work. If anyone could give me a hand I’d be super grateful.

Screenshot 2023-11-26 134856

Screenshot 2023-11-26 134907

Build started at 1:46 PM...
1>------ Skipped Build: Project: UE5, Configuration: BuiltWithUnrealBuildTool Win64 ------
1>Project not selected to build for this solution configuration 
2>------ Build started: Project: CPlusBasics, Configuration: Development_Editor x64 ------
3>------ Build started: Project: BuildGraph.Automation, Configuration: Development Any CPU ------
4>------ Build started: Project: AutomationScripts.Automation, Configuration: Development Any CPU ------
2>Using bundled DotNet SDK version: 6.0.302
2>Running UnrealBuildTool: dotnet "..\..\Engine\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll" CPlusBasicsEditor Win64 Development -Project="C:\Users\Nic\Documents\Unreal Projects\CPlusBasics\CPlusBasics.uproject" -WaitMutex -FromMsBuild
2>Log file: C:\Users\Nic\AppData\Local\UnrealBuildTool\Log.txt
2>Target is up to date
2>Total execution time: 0.68 seconds
3>C:\Program Files\Epic Games\UE_5.3\Engine\Source\Programs\AutomationTool\BuildGraph\BgScriptReader.cs(1640,37,1640,42): error CS8604: Possible null reference argument for parameter 'other' in 'void HashSet<string>.UnionWith(IEnumerable<string> other)'.
3>Done building project "BuildGraph.Automation.csproj" -- FAILED.
4>C:\Program Files\Epic Games\UE_5.3\Engine\Source\Programs\AutomationTool\Scripts\CheckForHacks.cs(89,35,89,42): error CA2017: Number of parameters supplied in the logging message template do not match the number of named placeholders (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2017)
4>Done building project "AutomationScripts.Automation.csproj" -- FAILED.
========== Build: 1 succeeded, 2 failed, 45 up-to-date, 1 skipped ==========
========== Build completed at 1:47 PM and took 19.068 seconds ==========

Are you sure you have your project selected as the default startup project?

Your project name should be in bold letters.
You can also right click it and choose build (first option).

You should only be building your project!

If you are using build your project based on the source version of the engine then perhaps you have not built the engine yet?

Okay I set the project and built it, was able to open unreal without the errors so fingers crossed that fixed it! Thanks!

Do you happen to know why this is happening tho?

There is only the private folder showing up in my content browser in unreal? Even tho I made a new class that is in the Public folder and it is showing in VS?

As a rule of thumb

  • public should store header files
  • private should store cpp files

Not sure how strict unreal is with this.
Try regenerating your project (there is no harm in that)

  • cpp files should have their header equivalent.
  • headers do not need a cpp

(you can have simple interfaces, enums & structs with no implementations)

1 Like