# BlueprintNativeEvent in an Interface Compiler Error

**URL:** <https://forums.unrealengine.com/t/blueprintnativeevent-in-an-interface-compiler-error/419672>\
**Category:** UI\
**Tags:** interface, unreal-engine, implementation, Blueprint, question\
**Created:** [March 12, 2018, 10:53pm UTC](https://forums.unrealengine.com/t/blueprintnativeevent-in-an-interface-compiler-error/419672 "2018-03-12T22:53:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kowbell](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Kowbell](https://forums.unrealengine.com/u/Kowbell)\
**Post date:** [March 12, 2018, 10:53pm UTC](https://forums.unrealengine.com/t/blueprintnativeevent-in-an-interface-compiler-error/419672/1 "2018-03-12T22:53:01Z")

</div>

I’m trying to add an UInterface in C++ that has a bunch of BlueprintNativeEvent functions, but cannot get it to compile no matter what. Given the following code:

**SelectableInterface.h**

```
#pragma once

#include "CoreMinimal.h"
#include "SelectableInterface.generated.h"

// This class does not need to be modified.
UINTERFACE(Blueprintable)
class USelectableInterface : public UInterface
{
	GENERATED_BODY()
};

/**
 * 
 */
class GAMEJAM2018_VGDC_API ISelectableInterface
{
	GENERATED_BODY()
public:
	
	/**
	 * Called when the player selects/deselects this actor
	 * BlueprintNativeEvent, so you can override in Blueprints. Remember, in
	 * C++ this means the .cpp file should only have 
	 * UpdateSelection_Implementation(...) !
	 */
	UFUNCTION(BlueprintNativeEvent, Category = "Selectable")
		void UpdateSelection(ESelectionState State = ESelectionState::Active);

};

```

**SelectableInterface.cpp**

```
#include "SelectableInterface.h"

void ISelectableInterface::UpdateSelection_Implementation(ESelectionState Type)
{
	UE_LOG(LogTemp, Error, TEXT("ISelectableInterface::UpdateSelection() not implemented/calls super!"));
}

```

I get the compilation error

```
SelectableInterface.h(34): error C2039: 'UpdateSelection_Implementation': is not a member of 'ISelectableInterface'
SelectableInterface.h(33): note: see declaration of 'ISelectableInterface'

```

with line 34 being the `GENERATED_BODY()` in `ISelectableInterface`.

I’ve tried not defining the function in .cpp at all, I’ve tried dropping `_Implementation` off the definintion, I’ve tried adding `BlueprintCallable`, I’ve tried overriding it in another class, I’ve tried a complete rebuild; each time, I still get the same error.

---

<div class="post-metadata">

**Author:** ![Atheist91](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Atheist91](https://forums.unrealengine.com/u/Atheist91)\
**Post date:** [March 13, 2018, 11:55am UTC](https://forums.unrealengine.com/t/blueprintnativeevent-in-an-interface-compiler-error/419672/2 "2018-03-13T11:55:54Z")

</div>

Hello.

You are missing declaration of **UpdateSelection\_Implementation** function in your header.

Just add

```
virtual void UpdateSelection_Implementation(ESelectionState State = ESelectionState::Active);

```

below:

```
void UpdateSelection(ESelectionState State = ESelectionState::Active);

```

Cheers.
