C++ class files not generating properly

Hello, I’m currently at the section 4 in the unreal course( crypt raider) and get the following errors:

-Whenever I try to create a new C++ actor component(or any c++ class) the .h and .cpp generated files seem to have path inclusion problems(“NewActorComponent.cpp” not found in “E:\Epic Games\Unreal Engine\Project\Test.vscode\compileCommands_Default.json”. ‘includePath’ from c_cpp_properties.json in folder ‘TEST’ will be used for this file instead.)


Tried fixes:
-modified the include path in my workspace C++ configuration as said in the quick fix but the errors cascade into other errors (cannot open source file “UBT_COMPILED_PLATFORM/UBT_COMPILED_PLATFORMPlatformCompilerPreSetup.h” (dependency of “CoreMinimal.h”))



-In my main Crypt Raider project I managed to solve the above errors but then I got a bunch of syntax errors

-Added the include path to my source folder in the c_cpp_properties.json file(since there was none)

-Tried deleting bin,intermediate,saved files and build from source
-Refreshed Visual Studio Code Project in UE
-Rebuild files with UE closed

Nothing worked, ready to throw in the towel

Very important:
I haven’t wrote anything in the files, they are just generated with these errors in any new project I make. I checked numerous topics about this issue and the fixes that were found didn’t apply in my case.

I had a similar problem. I had to exit it all and then from file explorer right click on my project and then generate visual studio project files. When i reopened those errors were gone.

Do Tools > Refresh VS Code Project within Unreal.

1 Like

So my HDD that UE was installed on died so I bought a new one and got to clean install gnu gcc compiler, UE and all the components. Before it died, refreshing the visual studio project or generating visual studio project files wasn’t solving the problem. It’s curious enough that this include errors still appear on the new drive after generating new c++ class components but the problem is being solved just with refreshing the visual studio project, to all the others that still experience the problem.

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

Privacy & Terms