How can I resolve UHT build error: "wrong superclass"?

Hi guys,

My project did compile well till today. I don’t remember making any code changes, however, while I build, I get those errors now:

Classes mentioned in errors are very simple and for now don’t have any real functionality:

What could be the problem?

Rebuilt the engine, fully rebuilt the project. Same error. The lines are indicating seemingly that I can not inherit from a AActor class, but this is not true, and it worked before.

#Build Target

Please post your build.cs



Hi Rama,

That is the funny thing. I have added the two lines into Build.cs, which supposedly increase compilation time.

// Copyright 1998-2014 Epic Games, Inc. All Rights Reserved.

using UnrealBuildTool;

public class Wolfdale : ModuleRules
	public Wolfdale(TargetInfo Target)
		PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore" });

        MinFilesUsingPrecompiledHeaderOverride = 1;
        bFasterWithoutUnity = true;

However, I thought that it might me the source of the problem, so what I did is commented those lines. And this did not fix anything! The errors were still showing :frowning:

I’m not trying to sound silly, but have you tried removing the gameframework includes?

Also, what code is in those other two .h includes above your .generated?

have you tried removing those in a test class?

#Debugging steps

make a new simple AActor extending class with no fancy header stuff

see if that works

if that doesnt work… well that will be the place start

if that DOES work

than the issue is with your .h includes above .generated

Hi Rama,

Thanks for ur answer. My colleague deleted my files and wrote them from scratch, with the same functionality and without needless includes. And they now work, for some reason. Probably it is connected to those includes. Thanks for ur help :slight_smile: