# new interface: include not found / base class undefined

**URL:** <https://forums.unrealengine.com/t/new-interface-include-not-found-base-class-undefined/280131>\
**Category:** UI\
**Tags:** interface, unreal-engine, UInterface, CPP, question\
**Created:** [April 9, 2014, 11:47pm UTC](https://forums.unrealengine.com/t/new-interface-include-not-found-base-class-undefined/280131 "2014-04-09T23:47:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dimatosaurus](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@dimatosaurus](https://forums.unrealengine.com/u/dimatosaurus)\
**Post date:** [April 9, 2014, 11:47pm UTC](https://forums.unrealengine.com/t/new-interface-include-not-found-base-class-undefined/280131/1 "2014-04-09T23:47:03Z")

</div>

Hey guys!  
i created a simple new interface ( following the tutorial in the wiki ).  
but i can not inherit from it. the compiler cannot find the include file “Usable.h”  
Every source file is in the MyGame directory. If i omit the include, the base class if  
undefined. i also tried to predeclarate it, but with no success. whats wrong?

```
// Usable.cpp
#pragma once
#include "Usable.generated.h"

UINTERFACE(MinimalAPI)
class UUsable :public UInterface
{
	GENERATED_UINTERFACE_BODY()
};

class IUsable
{
	GENERATED_IINTERFACE_BODY()
	virtual void OnUsed(AController * user);
};

// Usable.cpp
#include "MyGame.h"

UUsable::UUsable(const class FPostConstructInitializeProperties& PCIP)
: Super(PCIP)
{

}

void IUsable::OnUsed(AController * user)
{

}

// Crate.h
#pragma once
#include "Usable.h"
#include "Crate.generated.h"

UCLASS()
class ACrate : public AActor, public IUsable
{
	GENERATED_UCLASS_BODY()

	virtual void OnUsed(AController* c) OVERRIDE;
};
```

---

<div class="post-metadata">

**Author:** ![dimatosaurus](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@dimatosaurus](https://forums.unrealengine.com/u/dimatosaurus)\
**Post date:** [April 10, 2014, 4:40pm UTC](https://forums.unrealengine.com/t/new-interface-include-not-found-base-class-undefined/280131/2 "2014-04-10T16:40:54Z")

</div>

Solved it. The files were in the wrong directory.  
Hint to myself:  
If you create files in Visual Studio, make sure they are created in the right directory!

---

<div class="post-metadata">

**Author:** ![facebook\_labs](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@facebook\_labs](https://forums.unrealengine.com/u/facebook_labs)\
**Post date:** [February 3, 2021, 2:49am UTC](https://forums.unrealengine.com/t/new-interface-include-not-found-base-class-undefined/280131/3 "2021-02-03T02:49:30Z")

</div>

Note: I ran into the problem of  
‘UInterface’: base class undefined  
The undocumented solution for 4.26 was to go to the top of your interface header file and add:

```
#include "UObject/Interface.h"
```
