Error:
error LNK2019: unresolved external symbol “__declspec(dllimport) public: __cdecl FWidgetRenderer::FWidgetRenderer(bool,bool)” (_imp??0FWidgetRenderer@@QEAA@_N0@Z) referenced in function “protected: virtual void __cdecl APlayerPawnBase::BeginPlay(void)” (?BeginPlay@APlayerPawnBase@@MEAAXXZ)
I’ve added dependancies to the build.cs (tried both public and private but both produce the same error):
public class VRRPG_CPP : ModuleRules
{
public VRRPG_CPP(ReadOnlyTargetRules Target) : base(Target)
{
PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;
PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "Slate", "SlateCore" });
PrivateDependencyModuleNames.AddRange(new string[] { });
// Uncomment if you are using Slate UI
PrivateDependencyModuleNames.AddRange(new string[] { "Slate", "SlateCore" });
// Uncomment if you are using online features
// PrivateDependencyModuleNames.Add("OnlineSubsystem");
// To include OnlineSubsystemSteam, add it to the plugins section in your uproject file with the Enabled attribute set to true
}
}
Before anyone asks, yeah, I did generate solution project files after changing build.cs but the error remains…
FWidgetRenderer is in UMG module so you need to add that in depency
For future if you want ot check which module you need to add to depency if you got linker errors go to API refrence of the element that causeing it and look on the bottom of the page, you will see both module name where that thing is declered as well as header file:
If you can’t find it in API refrence you need to search is source code, the module name is directory name of 2nd directory after Source directoruy, so in case of FWidgetRenderer directory after Runtime: