LNK2019 errors when extending from DemoNetDriver

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 :

  1. Using the ENGINE_API prefix. This resulted in “inconsistent dll linkage” errors.
  2. Adding all the engine dependencies to PublicDependencyModuleNames. Which again didn’t work.

Thanks !

Hey!

Did you manage to find anything?
I am also struggling with it:

Hey !

Nope, but I read they are still working on the final version, and this version doesn’t handle physics frames that good so I’m going to wait a bit.

Glad you had you problem fixed :wink:

If you are in 4.6 or higher, GENERATED_UCLASS_BODY() Has been replaced by GENERATED_BODY()

That fixes it, thanks :wink: