I’m having trouble with my new module.
In my OnlineSubsystemUnincModule.cpp
I have IMPLEMENT_MODULE(FOnlineSubsystemUnincModule, OnlineSubsystemUninc);
In my ProjectName.uproject I have
{
"Name": "OnlineSubsystemUninc",
"Type": "Runtime",
"LoadingPhase": "Default"
},
In my primary module’s .Build.cs I have
PublicDependencyModuleNames.AddRange(new string[]
{
// Other modules...
"OnlineSubsystemUninc"
});
in the Modules array.
As a test, I added a Print() method to my FOnlineSubsystemUninc
class, but when I build I receive the following error
Severity Code Description Project File Line Suppression State Details
Error LNK2019 unresolved external symbol "public: void __cdecl FOnlineSubsystemUninc::Print(void)" (?Print@FOnlineSubsystemUninc@@QEAAXXZ) referenced in function "public: void __cdecl AShadowNetworkCharacter::OnSelectPressed(void)" (?OnSelectPressed@AShadowNetworkCharacter@@QEAAXXZ) ShadowNetwork D:unincsnet-clientShadowNetworkIntermediateProjectFilesShadowNetworkCharacter.cpp.obj 1
Below is the actual code trying to call the Print method
FOnlineSubsystemUninc* OnlineSubsystemUninc = static_cast<FOnlineSubsystemUninc*>(OnlineSubsystem);
if (OnlineSubsystemUninc == nullptr)
{
UE_LOG(LogCharacter, Warning, TEXT("FOnlineSubsystemUninc static_cast failed"));
return;
}
OnlineSubsystemUninc->Print(); // ERROR: causes unresolved external symbol
I’ve double checked all of the naming. I’ve looked online for days, but come up empty. Any help would be greatly appreciated.