Inheriting from URadialForceComponent

Hi,

I’m trying to create a special kind of RadialForceComponent so I thought the easiest way would be to inhert from URadialForceComponent. So I created the class with the C++ class wizard in Unreal and the header looks like this:

#pragma once

#include "PhysicsEngine/RadialForceComponent.h"
#include "MyRadialForceComponent.generated.h"

/**
 * 
 */
UCLASS()
class RETROPROTOTYP_API UMyRadialForceComponent : public URadialForceComponent
{
	GENERATED_BODY()
	
	
};

But the compiler gives the following errors:

1>MyRadialForceComponent.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl URadialForceComponent::FireImpulse(void)" (?FireImpulse@URadialForceComponent@@UEAAXXZ)
1>RetroPrototyp.generated.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl URadialForceComponent::FireImpulse(void)" (?FireImpulse@URadialForceComponent@@UEAAXXZ)
1>MyRadialForceComponent.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl URadialForceComponent::AddObjectTypeToAffect(class TEnumAsByte<enum EObjectTypeQuery>)" (?AddObjectTypeToAffect@URadialForceComponent@@UEAAXV?$TEnumAsByte@W4EObjectTypeQuery@@@@@Z)
1>RetroPrototyp.generated.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl URadialForceComponent::AddObjectTypeToAffect(class TEnumAsByte<enum EObjectTypeQuery>)" (?AddObjectTypeToAffect@URadialForceComponent@@UEAAXV?$TEnumAsByte@W4EObjectTypeQuery@@@@@Z)
1>MyRadialForceComponent.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl URadialForceComponent::RemoveObjectTypeToAffect(class TEnumAsByte<enum EObjectTypeQuery>)" (?RemoveObjectTypeToAffect@URadialForceComponent@@UEAAXV?$TEnumAsByte@W4EObjectTypeQuery@@@@@Z)
1>RetroPrototyp.generated.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl URadialForceComponent::RemoveObjectTypeToAffect(class TEnumAsByte<enum EObjectTypeQuery>)" (?RemoveObjectTypeToAffect@URadialForceComponent@@UEAAXV?$TEnumAsByte@W4EObjectTypeQuery@@@@@Z)
1>MyRadialForceComponent.cpp.obj : error LNK2001: unresolved external symbol "protected: virtual void __cdecl URadialForceComponent::TickComponent(float,enum ELevelTick,struct FActorComponentTickFunction *)" (?TickComponent@URadialForceComponent@@MEAAXMW4ELevelTick@@PEAUFActorComponentTickFunction@@@Z)
1>RetroPrototyp.generated.cpp.obj : error LNK2001: unresolved external symbol "protected: virtual void __cdecl URadialForceComponent::TickComponent(float,enum ELevelTick,struct FActorComponentTickFunction *)" (?TickComponent@URadialForceComponent@@MEAAXMW4ELevelTick@@PEAUFActorComponentTickFunction@@@Z)
1>MyRadialForceComponent.cpp.obj : error LNK2001: unresolved external symbol "protected: virtual void __cdecl URadialForceComponent::PostLoad(void)" (?PostLoad@URadialForceComponent@@MEAAXXZ)
1>RetroPrototyp.generated.cpp.obj : error LNK2001: unresolved external symbol "protected: virtual void __cdecl URadialForceComponent::PostLoad(void)" (?PostLoad@URadialForceComponent@@MEAAXXZ)
1>MyRadialForceComponent.cpp.obj : error LNK2001: unresolved external symbol "protected: virtual void __cdecl URadialForceComponent::PostEditChangeProperty(struct FPropertyChangedEvent &)" (?PostEditChangeProperty@URadialForceComponent@@MEAAXAEAUFPropertyChangedEvent@@@Z)
1>RetroPrototyp.generated.cpp.obj : error LNK2001: unresolved external symbol "protected: virtual void __cdecl URadialForceComponent::PostEditChangeProperty(struct FPropertyChangedEvent &)" (?PostEditChangeProperty@URadialForceComponent@@MEAAXAEAUFPropertyChangedEvent@@@Z)

I found another post with a similar problem and tried the solution from there but that just gives another set of errors:

1>D:\UnrealEngine\Epic Games\4.6\Engine\Source\Runtime\Engine\Classes\PhysicsEngine/RadialForceComponent.h(13): error C2487: 'GetPrivateStaticClass' : member of dll interface class may not be declared with dll interface
1>D:\UnrealEngine\Epic Games\4.6\Engine\Source\Runtime\Engine\Classes\PhysicsEngine/RadialForceComponent.h(13): error C2487: 'URadialForceComponent::{ctor}' : member of dll interface class may not be declared with dll interface

I’m new to C++ so I have no idea what to do now, I hope someone can help me :slight_smile:

I think there is a more general problem related to this. I am also experiencing the same problem when trying to extend a class from the AIMODULE_API.

I’m having this exact same problem after inheriting from URadialForceComponent. Any thoughts? Using UE4 4.15.