How to inherit light class - lot of Linking Errors

Hey guys!

I’m currently working on a custom project, but getting a lot of Link Errors.

I found a Solution, telling me to add ENGINE_API to the functions that are erroring.

So I changed:

virtual void OnRep_bEnabled();

to

ENGINE_API virtual void OnRep_bEnabled();

And so on, but the error persists. Anyone got an idea?

Module.TestDemo.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl AExponentialHeightFog::OnRep_bEnabled(void)" (?OnRep_bEnabled@AExponentialHeightFog@@UEAAXXZ)
1>Module.TestDemo.gen.72_of_77.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl AExponentialHeightFog::OnRep_bEnabled(void)" (?OnRep_bEnabled@AExponentialHeightFog@@UEAAXXZ)
1>Module.TestDemo.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl AExponentialHeightFog::PostInitializeComponents(void)" (?PostInitializeComponents@AExponentialHeightFog@@UEAAXXZ)
1>Module.TestDemo.gen.72_of_77.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl AExponentialHeightFog::PostInitializeComponents(void)" (?PostInitializeComponents@AExponentialHeightFog@@UEAAXXZ)
1>Module.TestDemo.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl AExponentialHeightFog::GetLifetimeReplicatedProps(class TArray<class FLifetimeProperty,class TSizedDefaultAllocator<32> > &)const " (?GetLifetimeReplicatedProps@AExponentialHeightFog@@UEBAXAEAV?$TArray@VFLifetimeProperty@@V?$TSizedDefaultAllocator@$0CA@@@@@@Z)
1>Module.TestDemo.gen.72_of_77.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl AExponentialHeightFog::GetLifetimeReplicatedProps(class TArray<class FLifetimeProperty,class TSizedDefaultAllocator<32> > &)const " (?GetLifetimeReplicatedProps@AExponentialHeightFog@@UEBAXAEAV?$TArray@VFLifetimeProperty@@V?$TSizedDefaultAllocator@$0CA@@@@@@Z)
1>Module.TestDemo.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl ADirectionalLight::PostEditChangeProperty(struct FPropertyChangedEvent &)" (?PostEditChangeProperty@ADirectionalLight@@UEAAXAEAUFPropertyChangedEvent@@@Z)
1>Module.TestDemo.gen.72_of_77.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl ADirectionalLight::PostEditChangeProperty(struct FPropertyChangedEvent &)" (?PostEditChangeProperty@ADirectionalLight@@UEAAXAEAUFPropertyChangedEvent@@@Z)
1>Module.TestDemo.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl ADirectionalLight::PostLoad(void)" (?PostLoad@ADirectionalLight@@UEAAXXZ)
1>Module.TestDemo.gen.72_of_77.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl ADirectionalLight::PostLoad(void)" (?PostLoad@ADirectionalLight@@UEAAXXZ)
1>Module.TestDemo.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl ADirectionalLight::LoadedFromAnotherClass(class FName const &)" (?LoadedFromAnotherClass@ADirectionalLight@@UEAAXAEBVFName@@@Z)
1>Module.TestDemo.gen.72_of_77.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl ADirectionalLight::LoadedFromAnotherClass(class FName const &)" (?LoadedFromAnotherClass@ADirectionalLight@@UEAAXAEBVFName@@@Z)
1>Module.TestDemo.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl ASpotLight::EditorApplyScale(struct FVector const &,struct FVector const *,bool,bool,bool)" (?EditorApplyScale@ASpotLight@@UEAAXAEBUFVector@@PEBU2@_N22@Z)
1>Module.TestDemo.gen.71_of_77.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl ASpotLight::EditorApplyScale(struct FVector const &,struct FVector const *,bool,bool,bool)" (?EditorApplyScale@ASpotLight@@UEAAXAEBUFVector@@PEBU2@_N22@Z)
1>Module.TestDemo.gen.73_of_77.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl ASpotLight::EditorApplyScale(struct FVector const &,struct FVector const *,bool,bool,bool)" (?EditorApplyScale@ASpotLight@@UEAAXAEBUFVector@@PEBU2@_N22@Z)
1>Module.TestDemo.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl ASpotLight::PostEditChangeProperty(struct FPropertyChangedEvent &)" (?PostEditChangeProperty@ASpotLight@@UEAAXAEAUFPropertyChangedEvent@@@Z)
1>Module.TestDemo.gen.71_of_77.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl ASpotLight::PostEditChangeProperty(struct FPropertyChangedEvent &)" (?PostEditChangeProperty@ASpotLight@@UEAAXAEAUFPropertyChangedEvent@@@Z)
1>Module.TestDemo.gen.73_of_77.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl ASpotLight::PostEditChangeProperty(struct FPropertyChangedEvent &)" (?PostEditChangeProperty@ASpotLight@@UEAAXAEAUFPropertyChangedEvent@@@Z)
1>Module.TestDemo.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl ASpotLight::PostLoad(void)" (?PostLoad@ASpotLight@@UEAAXXZ)
1>Module.TestDemo.gen.71_of_77.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl ASpotLight::PostLoad(void)" (?PostLoad@ASpotLight@@UEAAXXZ)
1>Module.TestDemo.gen.73_of_77.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl ASpotLight::PostLoad(void)" (?PostLoad@ASpotLight@@UEAAXXZ)
1>Module.TestDemo.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl ASpotLight::LoadedFromAnotherClass(class FName const &)" (?LoadedFromAnotherClass@ASpotLight@@UEAAXAEBVFName@@@Z)
1>Module.TestDemo.gen.71_of_77.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl ASpotLight::LoadedFromAnotherClass(class FName const &)" (?LoadedFromAnotherClass@ASpotLight@@UEAAXAEBVFName@@@Z)
1>Module.TestDemo.gen.73_of_77.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl ASpotLight::LoadedFromAnotherClass(class FName const &)" (?LoadedFromAnotherClass@ASpotLight@@UEAAXAEBVFName@@@Z)
1>Module.TestDemo.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl APointLight::EditorApplyScale(struct FVector const &,struct FVector const *,bool,bool,bool)" (?EditorApplyScale@APointLight@@UEAAXAEBUFVector@@PEBU2@_N22@Z)
1>Module.TestDemo.gen.67_of_77.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl APointLight::EditorApplyScale(struct FVector const &,struct FVector const *,bool,bool,bool)" (?EditorApplyScale@APointLight@@UEAAXAEBUFVector@@PEBU2@_N22@Z)
1>Module.TestDemo.gen.73_of_77.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl APointLight::EditorApplyScale(struct FVector const &,struct FVector const *,bool,bool,bool)" (?EditorApplyScale@APointLight@@UEAAXAEBUFVector@@PEBU2@_N22@Z)
1>Module.TestDemo.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl APointLight::PostLoad(void)" (?PostLoad@APointLight@@UEAAXXZ)
1>Module.TestDemo.gen.67_of_77.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl APointLight::PostLoad(void)" (?PostLoad@APointLight@@UEAAXXZ)
1>Module.TestDemo.gen.73_of_77.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl APointLight::PostLoad(void)" (?PostLoad@APointLight@@UEAAXXZ)
1>Module.TestDemo.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl APointLight::LoadedFromAnotherClass(class FName const &)" (?LoadedFromAnotherClass@APointLight@@UEAAXAEBVFName@@@Z)
1>Module.TestDemo.gen.67_of_77.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl APointLight::LoadedFromAnotherClass(class FName const &)" (?LoadedFromAnotherClass@APointLight@@UEAAXAEBVFName@@@Z)
1>Module.TestDemo.gen.73_of_77.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl APointLight::LoadedFromAnotherClass(class FName const &)" (?LoadedFromAnotherClass@APointLight@@UEAAXAEBVFName@@@Z)
1>Module.TestDemo.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl UPreviewMeshCollection::GetPreviewSkeletalMeshes(class TArray<class USkeletalMesh *,class TSizedDefaultAllocator<32> > &,class TArray<class TSubclassOf<class UAnimInstance>,class TSizedDefaultAllocator<32> > &)const " (?GetPreviewSkeletalMeshes@UPreviewMeshCollection@@UEBAXAEAV?$TArray@PEAVUSkeletalMesh@@V?$TSizedDefaultAllocator@$0CA@@@@@AEAV?$TArray@V?$TSubclassOf@VUAnimInstance@@@@V?$TSizedDefaultAllocator@$0CA@@@@@@Z)
1>Module.TestDemo.gen.28_of_77.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl UPreviewMeshCollection::GetPreviewSkeletalMeshes(class TArray<class USkeletalMesh *,class TSizedDefaultAllocator<32> > &,class TArray<class TSubclassOf<class UAnimInstance>,class TSizedDefaultAllocator<32> > &)const " (?GetPreviewSkeletalMeshes@UPreviewMeshCollection@@UEBAXAEAV?$TArray@PEAVUSkeletalMesh@@V?$TSizedDefaultAllocator@$0CA@@@@@AEAV?$TArray@V?$TSubclassOf@VUAnimInstance@@@@V?$TSizedDefaultAllocator@$0CA@@@@@@Z