What is the proper way to implement an interface function that returns a struct in C++?

I can’t find any examples of how to do this anywhere but I did find something in the engine and tried to copy the syntax but I can’t get it to work.

I get this error

unresolved external symbol "public: virtual struct FEntityData const & __cdecl IIEntity::GetEntityData(void)const " (?GetEntityData@IIEntity@@UEBAAEBUFEntityData@@XZ)

Declaration in class implementing

	virtual const struct FEntityData& GetEntityData() const override;   

Implementation in class implementing

const FEntityData& AGameCharacter::GetEntityData() const
{
	return EntityData;
}

Declaration in interface class

	virtual const FEntityData& GetEntityData() const;

Had to implement a default implementation in the interface class.