ive got an interface ill call MyInterace, and an Actor ill call MyActor, ive inherited the interface like this. class FIRSTUNREALPROJECT_API AMyActor : public AActor, public IMyInterface
for some reason, this isnt compiling, and ive included the include. these are the errors im getting.
Error (active) E1455 member function declared with 'override' does not override a base class member FirstUnrealproject D:\UE_5.4\Engine\Source\Runtime\Core\Public\Serialization\ArchiveProxy.h 157```
|Severity|Code|Description|Project|File|Line|Suppression State|Details|
|---|---|---|---|---|---|---|---|
|Error (active)|E1455|member function declared with 'override' does not override a base class member|FirstUnrealproject|D:\UE_5.4\Engine\Source\Runtime\Core\Public\Serialization\ArchiveProxy.h|167|||```
|Severity|Code|Description|Project|File|Line|Suppression State|Details|
|---|---|---|---|---|---|---|---|
|Error (active)|E0020|identifier FTextureBuildSettings is undefined|FirstUnrealproject|D:\UE_5.4\Engine\Source\Runtime\Engine\Classes\Engine\Texture.h|2017|||
|Severity|Code|Description|Project|File|Line|Suppression State|Details|
|---|---|---|---|---|---|---|---|
|Error|MSB3073|The command D:\UE_5.4\Engine\Build\BatchFiles\Build.bat FirstUnrealprojectEditor Win64 Development -Project=D:\Fork-GitStuff\FirstUnrealproject\FirstUnrealproject.uproject -WaitMutex -FromMsBuild -architecture=x64 exited with code 6.|FirstUnrealproject|C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.MakeFile.Targets|44|||
Any help would be appreciated, as I’m stumped!
edit: after compiling in editor, another error im getting is IMyInterface is undefined. im really unsure on this as i have defined it?
The error mentions that the method in the base class does not contain the method you are trying to override.
The error also mentions FTextureBuildSettings as an unkown class
add TextureCompressor module into your build file and add the include #include "TextureCompressorModule.h" if you need it.
Posting the interface and implementing class code would help.
Also make sure you are compiling your project (try right clicking it in the IDE and choosing build)
ArchiveProxy errors usually mean you are trying to compile the binary version of the engine
If the engine is set to default project then right click you project game name and pick set as default startup project.
adding TextureCompressureModule fixed that issue, changing to build seem to give me errors as im using the unreal build tool.dll. im not sure what to do on the default build issue, as im not sure what im supposed to be right clicking. im now getting these 2 errors ```Severity Code Description Project File Line Suppression State Details
Error C2504 ‘IMyVisitor’: base class undefined FirstUnrealproject D:\Fork-GitStuff\FirstUnrealproject\Source\FirstUnrealproject\Public\NavGraph.h 12
Severity
Code
Description
Project
File
Line
Suppression State
Details
Error
C3668
‘ANavGraph::_getUObject’: method with override specifier ‘override’ did not override any base class methods
Here is the interface code ``` #pragma once
#include "CoreMinimal.h"
#include "DynamicObstacle.h"
#include "UObject/Interface.h"
#include "MyVisitor.generated.h"
// This class does not need to be modified.
UINTERFACE(MinimalAPI)
class UMyVisitor : public UInterface
{
GENERATED_BODY()
};
/**
*
*/
class FIRSTUNREALPROJECT_API IMyVisitor
{
GENERATED_BODY()
// Add interface functions to this class. This is the class that will be inherited to implement this interface.
public:
//virtual void Visit(UDynamicObstacle& dynamicObstacle);
};
here is the implement code, though most of it i think is irrelevant to the problem ``` pragma once
include “CoreMinimal.h” include “Interfaces\MyVisitor.h” include “GameFramework/Actor.h” include “NavGraph.generated.h”
using namespace std;
UCLASS()
class FIRSTUNREALPROJECT_API ANavGraph : public AActor, public IMyVisitor
{
GENERATED_BODY()
Though the triple pointer may be causing some instabilities. Not sure why you would need a pointer to a pointer to a pointer.
Just use a matrix at that point (FMatrix struct)
thanks for the links! as for the errors im getting, i assume you mean the compiler ones, its the same 2 as before.
Severity Code Description Project File Line Suppression State Details
Error C2504 'IMyVisitor': base class undefined FirstUnrealproject D:\Fork-GitStuff\FirstUnrealproject\Source\FirstUnrealproject\Public\NavGraph.h 28
and this error
Error C3668 'ANavGraph::_getUObject': method with override specifier 'override' did not override any base class methods FirstUnrealproject D:\Fork-GitStuff\FirstUnrealproject\Source\FirstUnrealproject\Public\NavGraph.h 30
im not sure if it has something to do with me deleting the interface before this? i named it wrong but couldnt figure out how to rename it in editor, and figured that if i was going to do everything by hand, it was easier to delete the cpp and h files, and recreate a new interface with the cirrect name, but this might have caused issues? its the only thing i can think of that might have caused a difference between yours and mine. i have double checked that the includes and all right.
Also i commented out the inherited functions as they were giving me errors as they couldnt find a method to override, and i wanted to compile my project in editor to see if that would fix it. editor compile issues are the same as the IDE ones
It might be an orphaned file in that case saved somewhere in unreal’s redirects.
a) Check that the file was deleted from the drive and not just from the solution explorer.
b) close vs
delete
intermediate
derivedDataCache
binaries
.vs
saved
and rebuild the project, this might clear up some problems.
As for the errors IMyvisitor
includes should be like this: #include “Interfaces/MyVisitor.h”
Perhaps that is causing problems with finding the header path
you were right, the files were still in my recycle bin, unfortunately, doing both 1 and 2 hasn’t fixed it, i have checked and my include is the same as well. I’m really not sure what else could be causing this. Thanks for the help!
Fixed it! heres the post which has the answer c++ - error C2504: base class undefined - Stack Overflow
the issue was that one of my includes was bringing the nav graph class ahead in the compiler than my include in MyVisitor DynamicObject, or at least that was it from what i understood. i just commented that out and now it compiles!. Thanks for your help with this, and the resources will be very helpfull!