I’m trying to extend the UGameEngine class and that included rewriting the init function. I’ve included all the includes (including #include “Net/NetworkProfiler.h” and #include “GameMapsSettings.h”) but the compiler still spits out these two linker errors
Error 1 error LNK2019: unresolved external symbol "__declspec(dllimport) public: static class UClass * __cdecl UGameMapsSettings::StaticClass(void)" (__imp_?StaticClass@UGameMapsSettings@@SAPEAVUClass@@XZ) referenced in function "class UGameMapsSettings const * __cdecl GetDefault<class UGameMapsSettings>(void)" (??$GetDefault@VUGameMapsSettings@@@@YAPEBVUGameMapsSettings@@XZ) D:\Users\Nicholas\Documents\Unreal Projects\WeirdGame 4.7\Intermediate\ProjectFiles\WeirdGameGameEngine.cpp.obj WeirdGame
Error 2 error LNK2019: unresolved external symbol "public: void __cdecl FNetworkProfiler::EnableTracking(bool)" (?EnableTracking@FNetworkProfiler@@QEAAX_N@Z) referenced in function "public: virtual void __cdecl UWeirdGameGameEngine::Init(class IEngineLoop *)" (?Init@UWeirdGameGameEngine@@UEAAXPEAVIEngineLoop@@@Z) D:\Users\Nicholas\Documents\Unreal Projects\WeirdGame 4.7\Intermediate\ProjectFiles\WeirdGameGameEngine.cpp.obj WeirdGame
Does anyone know what the problemo is?
Heres the parts of the code that calls the thingy
#if USE_NETWORK_PROFILER
FString NetworkProfilerTag;
if (FParse::Value(FCommandLine::Get(), TEXT("NETWORKPROFILER="), NetworkProfilerTag))
{
GNetworkProfiler.EnableTracking(true);
}
#endif
// Create game instance. For GameEngine, this should be the only GameInstance that ever gets created.
{
FStringClassReference GameInstanceClassName = GetDefault<UGameMapsSettings>()->GameInstanceClass;
UClass* GameInstanceClass = (GameInstanceClassName.IsValid() ? LoadObject<UClass>(NULL, *GameInstanceClassName.ToString()) : UGameInstance::StaticClass());
GameInstance = ConstructObject<UGameInstance>(GameInstanceClass, this);
GameInstance->InitializeStandalone();
}