Build failed after adding new C++ class

Hey guys,

I want to create a new c++ class in Unreal engine 5.4. When i click on ‘create class’. I see the class appaering in Visual Studio Code with alot of errors. And i get a message in Unreal Editor that the build has been failed. Tried i alot of times but always same issue.

Someone has solved this problem?

Greetings

Hi!

Have you tried to open .sln and build from there?

yes, i already tried but then i get compilation errors. I think i go to install another Windows 11 SDK. Hopefully that works

Are the errors you got while building from .sln the same as the ones you got from livecoding?

Yes are the same error messages.

  1. Please don’t take pictures of your error messages. Copy/paste the actual text. Your picture cuts off a significant portion of the error message and it’s generally impossible for anyone to help without the full message.

  2. You can’t/shouldn’t live code header changes. That includes adding new headers through the Editor.

I works now.

Solution: when you create a new c++ class in unreal editor, choose public or private , and then click create and it works…