Hi, I’m trying to extend DemoNetDriver on the ShooterGame module but have been plagued by compiler errors.
My header :
#pragma once
#include "Engine/DemoNetDriver.h"
#include "SlowMoNetDriver.generated.h"
UCLASS(transient, config = Engine)
class USlowMoNetDriver : public UDemoNetDriver
{
GENERATED_UCLASS_BODY()
};
And my cpp :
#include "ShooterGame.h"
#include "Engine/DemoNetDriver.h"
These are the compiler errors :
ShooterGame.generated.cpp.obj : error LNK2019: unresolved external symbol "private: static class UClass * __cdecl UDemoNetDriver::GetPrivateStaticClass(wchar_t const *)" (?GetPrivateStaticClass@UDemoNetDriver@@CAPEAVUClass@@PEB_W@Z) referenced in function "void __cdecl GetPrivateStaticClassBody<class USlowMoNetDriver>(wchar_t const *,wchar_t const *,class UClass * &,void (__cdecl*)(void))" (??$GetPrivateStaticClassBody@VUSlowMoNetDriver@@@@YAXPEB_W0AEAPEAVUClass@@P6AXXZ@Z)
ShooterGame.generated.cpp.obj : error LNK2019: unresolved external symbol "public: __cdecl USlowMoNetDriver::USlowMoNetDriver(class FObjectInitializer const &)" (??0USlowMoNetDriver@@QEAA@AEBVFObjectInitializer@@@Z) referenced in function "void __cdecl InternalConstructor<class USlowMoNetDriver>(class FObjectInitializer const &)" (??$InternalConstructor@VUSlowMoNetDriver@@@@YAXAEBVFObjectInitializer@@@Z)
I’ve tried multiple solutions to similar problems :
- Using the ENGINE_API prefix. This resulted in “inconsistent dll linkage” errors.
- Adding all the engine dependencies to PublicDependencyModuleNames. Which again didn’t work.
Thanks !