UE5: fatal error: CoreMinimal.h: No such file or directory

Hello, I am leaning to use UE5 and am following this tutorial : https://www.youtube.com/watch?v=KQgOqyYoHAs

However, when I try to compile a simple pawn class on vscode, I am given the error: “CoreMinimal.h: No such file or directory”.

I have tried:

  • refreshing vscode through UE5

  • adding UE5’s public folder to PATH

  • Uninstalling and reinstalling both UE5 and vscode

I am out of ideas, I have tried every solution I could find on google.

Please show a screenshot of the error window.


That’s trying to compile a single file with GCC, you can see it doing

g++ RollBallPlayer.cpp -o RollBallPlayer

which says compile the single file RollBallPlayer.cpp and output an executable with the same name. Building Unreal projects in not that straight forward which is why it has its own build system. Also MinGW isn’t a supported compiler as far as I know.

How are you compiling?

I am pressing ctr+shift+b in vscode and compiling with g++.
Also, UE5 is unable to build the code either as I am unable to open this project, I am given the error message “(my game) could not be compiled. Try rebuilding from source manually.”
If minGW isn’t supported what software should I use? the tutorial did not specify this, they seem to be using a paid IDE.

You are then probably using a build task VS Code generated? You need to use ones that Unreal generated which will use its build system.

As for compiler, Visual Studio Community 2022.

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.

Privacy & Terms