[C++] Linker Error LNK2001 when compiling interface

Hi.
I have a little c++ interface:

// Fill out your copyright notice in the Description page of Project Settings.

#pragma once

#include "UObject/ObjectMacros.h"
#include "UObject/ScriptMacros.h"
#include "UObject/Interface.h"
#include "CppErstlingDamageInterface.generated.h"


UINTERFACE(MinimalAPI, Blueprintable)
class UCppErstlingDamageInterface : public UInterface
{
    GENERATED_BODY()
};

class ERSTLING_API ICppErstlingDamageInterface
{
    GENERATED_BODY()

public:
    virtual bool CppCanTakeDamage();
    virtual void CppTakeDamage(float damage, FVector location, FVector normal, AController* killer, AActor* weapon);
};

i implement it in a character class: (.h)

UCLASS()
class ERSTLING_API ACppErstlingCharacter : public ACharacter, public ICppErstlingDamageInterface
{
...

and in .h:

virtual bool CppCanTakeDamage() override;

and cpp:

bool ACppErstlingCharacter::CppCanTakeDamage()
{
	return true;
}

the same for the other function.
but i always get compiler error “Fatal Error LNK2001 unresolved external”.
im trying for an hour but i cant get a solution.
please help

Try GENERATED_UINTERFACE_BODY() in class UCppErstlingDamageInterface instead of GENERATED_BODY()

Edit: probably forget that, GENERATED_BODY seems to be used now?

Edit2: Declare your functions pure virtual in ICppErstlingDamageInterface by adding = 0

virtual bool CppCanTakeDamage() = 0;
virtual void CppTakeDamage(float damage, FVector location, FVector normal, AController* killer, AActor* weapon) = 0;

Oh yes. That “= 0” did the trick.
thank you!