"incomplete type is not allowed" & "member function declared with 'override' does not override a base class member"

hello world.

started blank project and created a c++ character but it gives me this error:

Severity Code Description Project File Line Suppression State Details
Error (active) E0070 incomplete type is not allowed SampleShooter C:\Program Files\Epic Games\UE_5.3\Engine\Source\Runtime\Core\Public\Containers\StringView.h 408
Error (active) E0070 incomplete type is not allowed SampleShooter C:\Program Files\Epic Games\UE_5.3\Engine\Source\Runtime\Core\Public\Containers\StringView.h 415
Error (active) E1455 member function declared with ‘override’ does not override a base class member SampleShooter C:\Program Files\Epic Games\UE_5.3\Engine\Source\Runtime\Core\Public\Serialization\ArchiveProxy.h 157
Error (active) E1455 member function declared with ‘override’ does not override a base class member SampleShooter C:\Program Files\Epic Games\UE_5.3\Engine\Source\Runtime\Core\Public\Serialization\ArchiveProxy.h 167

the header file is this:

#pragma once

include “CoreMinimal.h”
include “GameFramework/Character.h”
include “BaseCharacter.generated.h”

UCLASS()
class SAMPLESHOOTER_API ABaseCharacter : public ACharacter
{
GENERATED_BODY()

public:
// Sets default values for this character’s properties
ABaseCharacter();

protected:
// Called when the game starts or when spawned
virtual void BeginPlay() override;

public:
// Called every frame
virtual void Tick(float DeltaTime) override;

// Called to bind functionality to input
virtual void SetupPlayerInputComponent(class UInputComponent* PlayerInputComponent) override;

};

the cpp file is this:

include “BaseCharacter.h”

// Sets default values
ABaseCharacter::ABaseCharacter()
{
// Set this character to call Tick() every frame. You can turn this off to improve performance if you don’t need it.
PrimaryActorTick.bCanEverTick = true;

}

// Called when the game starts or when spawned
void ABaseCharacter::BeginPlay()
{
Super::BeginPlay();

}

// Called every frame
void ABaseCharacter::Tick(float DeltaTime)
{
Super::Tick(DeltaTime);

}

// Called to bind functionality to input
void ABaseCharacter::SetupPlayerInputComponent(UInputComponent* PlayerInputComponent)
{
Super::SetupPlayerInputComponent(PlayerInputComponent);

}

i dont see any include mistakes and the code should work.

sounds like he had the same problem:

…is there any other solution besides ignoring it by using build only ?

edit:

also wrote the question on stackoverflow:

c++ - “incomplete type is not allowed” & “member function declared with ‘override’ does not override a base class member” in blank UE 5.3 project - Stack Overflow

I’m a bit late… but for others like myself searching this now, I did come across a video on youtube which solved my problem.

1-Created new blueprint based project
2-Added a “New C++ Class”
3-Tried to compile in VS when prompted by UE… yada yada yada

After a few attempts with 4 errors each time, I tried a method from YouTube, which is the same steps, but instead of opening VS from the prompt (3), save and just close the prompt after adding the new C++ file (I went ahead and completely closed UE itself also). After you close the prompt, go into your project’s folder and then right click on the .uproject, then click “Generate Visual Studio project files” (you may need to open more options from the dropdown). After it generates the files, you can now open up the .sln without errors after adding a new C++ file in the project.

After generating the files once the first time, I haven’t had any problems afterwards adding in new C++ files to the test project. So there is no need to keep generating files (as far as I can tell as of now).

Hopefully this is the same case and solution that may help others.

4 Likes

I did this as well but the dreaded 4 errors came back lol. Doesn’t seem to be hurting anything in my case, but I still don’t like it lol

1 Like