Link Error, Slate related

I was wondering if someone could help with this link error. I was making a HUD class and a widget.

I included “Slate.h” in my HUD header,which is the class I think most of these are coming from. I think it is all the Slate stuff.

1>------ Build started: Project: RocketCat, Configuration: Debug x64 ------
1>  Module.RocketCat.cpp
1>  link.exe RocketEditor-RocketCat-Win64-Debug.dll
1>     Creating library D:\Development\RocketCat\Intermediate\BuildData\RocketCat\Win64\DebugGame\RocketEditor-RocketCat-Win64-Debug.lib and object D:\Development\RocketCat\Intermediate\BuildData\RocketCat\Win64\DebugGame\RocketEditor-RocketCat-Win64-Debug.exp
1>Module.RocketCat.cpp.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static class FSlateApplication & __cdecl FSlateApplication::Get(void)" (__imp_?Get@FSlateApplication@@SAAEAV1@XZ) referenced in function "protected: void __cdecl ARocketCatHUD::BuildMenuWidgets(void)" (?BuildMenuWidgets@ARocketCatHUD@@IEAAXXZ)
1>Module.RocketCat.cpp.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __cdecl FSlateApplication::SetFocusToGameViewport(void)" (__imp_?SetFocusToGameViewport@FSlateApplication@@QEAAXXZ) referenced in function "protected: void __cdecl ARocketCatHUD::BuildMenuWidgets(void)" (?BuildMenuWidgets@ARocketCatHUD@@IEAAXXZ)
1>Module.RocketCat.cpp.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) private: static void * __cdecl FSlateControlledConstruction::operator new(unsigned __int64)" (__imp_??2FSlateControlledConstruction@@CAPEAX_K@Z) referenced in function "public: __cdecl TDecl::TDecl(char const *,char const *,int,struct RequiredArgs::T0RequiredArgs const &)" (??0?$TDecl@VSTestHUDWidget@@UT0RequiredArgs@RequiredArgs@@@@QEAA@PEBD0HAEBUT0RequiredArgs@RequiredArgs@@@Z)
1>Module.RocketCat.cpp.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static void __cdecl FSlateControlledConstruction::operator delete(void *)" (__imp_??3FSlateControlledConstruction@@SAXPEAX@Z) referenced in function "int `public: __cdecl TDecl::TDecl(char const *,char const *,int,struct RequiredArgs::T0RequiredArgs const &)'::`1'::dtor$0" (?dtor$0@?0???0?$TDecl@VSTestHUDWidget@@UT0RequiredArgs@RequiredArgs@@@@QEAA@PEBD0HAEBUT0RequiredArgs@RequiredArgs@@@Z@4HA)
1>Module.RocketCat.cpp.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class TSharedRef __cdecl TSharedFromThis::AsShared(void)" (__imp_?AsShared@?$TSharedFromThis@VSWidget@@$0A@@@QEAA?AV?$TSharedRef@VSWidget@@$0A@@@XZ) referenced in function "protected: static class TSharedRef __cdecl TSharedFromThis::SharedThis(class STestHUDWidget *)" (??$SharedThis@VSTestHUDWidget@@@?$TSharedFromThis@VSWidget@@$0A@@@KA?AV?$TSharedRef@VSTestHUDWidget@@$0A@@@PEAVSTestHUDWidget@@@Z)
1>Module.RocketCat.cpp.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __cdecl SWidget::Construct(class TAttribute const &,class TSharedPtr const &,class TAttribute > const &,class TAttribute const &,class TAttribute const &,class FName const &)" (__imp_?Construct@SWidget@@QEAAXAEBV?$TAttribute@VFString@@@@AEBV?$TSharedPtr@VSToolTip@@$0A@@@AEBV?$TAttribute@U?$TOptional@W4Type@EMouseCursor@@@@@@AEBV?$TAttribute@_N@@AEBV?$TAttribute@UEVisibility@@@@AEBVFName@@@Z) referenced in function "public: class TSharedRef __cdecl TDecl::operator<<=(struct STestHUDWidget::FArguments const &)const " (??_3?$TDecl@VSTestHUDWidget@@UT0RequiredArgs@RequiredArgs@@@@QEBA?AV?$TSharedRef@VSTestHUDWidget@@$0A@@@AEBUFArguments@STestHUDWidget@@@Z)
1>Module.RocketCat.cpp.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual void __cdecl SWidget::Tick(class FGeometry const &,double,float)" (__imp_?Tick@SWidget@@UEAAXAEBVFGeometry@@NM@Z) referenced in function "public: virtual void __cdecl STestHUDWidget::Tick(class FGeometry const &,double,float)" (?Tick@STestHUDWidget@@UEAAXAEBVFGeometry@@NM@Z)
1>Module.RocketCat.cpp.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual class FReply __cdecl SWidget::OnKeyDown(class FGeometry const &,class FKeyboardEvent const &)" (__imp_?OnKeyDown@SWidget@@UEAA?AVFReply@@AEBVFGeometry@@AEBVFKeyboardEvent@@@Z) referenced in function "public: virtual class FReply __cdecl STestHUDWidget::OnKeyDown(class FGeometry const &,class FKeyboardEvent const &)" (?OnKeyDown@STestHUDWidget@@UEAA?AVFReply@@AEBVFGeometry@@AEBVFKeyboardEvent@@@Z)
1>Module.RocketCat.cpp.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __cdecl SWidget::SetDebugInfo(char const *,char const *,int)" (__imp_?SetDebugInfo@SWidget@@QEAAXPEBD0H@Z) referenced in function "public: __cdecl TDecl::TDecl(char const *,char const *,int,struct RequiredArgs::T0RequiredArgs const &)" (??0?$TDecl@VSTestHUDWidget@@UT0RequiredArgs@RequiredArgs@@@@QEAA@PEBD0HAEBUT0RequiredArgs@RequiredArgs@@@Z)
1>Module.RocketCat.cpp.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) protected: __cdecl SCompoundWidget::SCompoundWidget(void)" (__imp_??0SCompoundWidget@@IEAA@XZ) referenced in function "public: __cdecl STestHUDWidget::STestHUDWidget(void)" (??0STestHUDWidget@@QEAA@XZ)
1>Module.RocketCat.cpp.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __cdecl SCompoundWidget::~SCompoundWidget(void)" (__imp_??1SCompoundWidget@@UEAA@XZ) referenced in function "public: virtual void * __cdecl STestHUDWidget::`scalar deleting destructor'(unsigned int)" (??_GSTestHUDWidget@@UEAAPEAXI@Z)
1>Module.RocketCat.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl SCompoundWidget::ArrangeChildren(class FGeometry const &,class FArrangedChildren &)const " (?ArrangeChildren@SCompoundWidget@@UEBAXAEBVFGeometry@@AEAVFArrangedChildren@@@Z)
1>Module.RocketCat.cpp.obj : error LNK2001: unresolved external symbol "protected: virtual void __cdecl SWidget::CacheDesiredSize(void)" (?CacheDesiredSize@SWidget@@MEAAXXZ)
1>Module.RocketCat.cpp.obj : error LNK2001: unresolved external symbol "public: virtual struct FVector2D __cdecl SCompoundWidget::ComputeDesiredSize(void)const " (?ComputeDesiredSize@SCompoundWidget@@UEBA?AUFVector2D@@XZ)
1>Module.RocketCat.cpp.obj : error LNK2001: unresolved external symbol "public: virtual class FChildren * __cdecl SCompoundWidget::GetChildren(void)" (?GetChildren@SCompoundWidget@@UEAAPEAVFChildren@@XZ)
1>Module.RocketCat.cpp.obj : error LNK2001: unresolved external symbol "public: virtual class FSlateColor __cdecl SCompoundWidget::GetForegroundColor(void)const " (?GetForegroundColor@SCompoundWidget@@UEBA?AVFSlateColor@@XZ)
1>Module.RocketCat.cpp.obj : error LNK2001: unresolved external symbol "public: virtual class FString __cdecl SWidget::GetParsableFileAndLineNumber(void)const " (?GetParsableFileAndLineNumber@SWidget@@UEBA?AVFString@@XZ)
1>Module.RocketCat.cpp.obj : error LNK2001: unresolved external symbol "public: virtual class FString __cdecl SWidget::GetReadableLocation(void)const " (?GetReadableLocation@SWidget@@UEBA?AVFString@@XZ)
1>Module.RocketCat.cpp.obj : error LNK2001: unresolved external symbol "public: virtual class TSharedPtr __cdecl SWidget::GetToolTip(void)" (?GetToolTip@SWidget@@UEAA?AV?$TSharedPtr@VSToolTip@@$0A@@@XZ)
1>Module.RocketCat.cpp.obj : error LNK2001: unresolved external symbol "public: virtual enum EWindowZone::Type __cdecl SWidget::GetWindowZoneOverride(void)const " (?GetWindowZoneOverride@SWidget@@UEBA?AW4Type@EWindowZone@@XZ)
1>Module.RocketCat.cpp.obj : error LNK2001: unresolved external symbol "public: virtual bool __cdecl SWidget::HasKeyboardFocus(void)const " (?HasKeyboardFocus@SWidget@@UEBA_NXZ)
1>Module.RocketCat.cpp.obj : error LNK2001: unresolved external symbol "public: virtual class FReply __cdecl SWidget::OnControllerAnalogValueChanged(class FGeometry const &,class FControllerEvent const &)" (?OnControllerAnalogValueChanged@SWidget@@UEAA?AVFReply@@AEBVFGeometry@@AEBVFControllerEvent@@@Z)
1>Module.RocketCat.cpp.obj : error LNK2001: unresolved external symbol "public: virtual class FReply __cdecl SWidget::OnControllerButtonPressed(class FGeometry const &,class FControllerEvent const &)" (?OnControllerButtonPressed@SWidget@@UEAA?AVFReply@@AEBVFGeometry@@AEBVFControllerEvent@@@Z)
1>Module.RocketCat.cpp.obj : error LNK2001: unresolved external symbol "public: virtual class FReply __cdecl SWidget::OnControllerButtonReleased(class FGeometry const &,class FControllerEvent const &)" (?OnControllerButtonReleased@SWidget@@UEAA?AVFReply@@AEBVFGeometry@@AEBVFControllerEvent@@@Z)
1>Module.RocketCat.cpp.obj : error LNK2001: unresolved external symbol "public: virtual class FCursorReply __cdecl SWidget::OnCursorQuery(void)const " (?OnCursorQuery@SWidget@@UEBA?AVFCursorReply@@XZ)
1>Module.RocketCat.cpp.obj : error LNK2001: unresolved external symbol "public: virtual class FReply __cdecl SWidget::OnDragDetected(class FGeometry const &,class FPointerEvent const &)" (?OnDragDetected@SWidget@@UEAA?AVFReply@@AEBVFGeometry@@AEBVFPointerEvent@@@Z)
1>Module.RocketCat.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl SWidget::OnDragEnter(class FGeometry const &,class FDragDropEvent const &)" (?OnDragEnter@SWidget@@UEAAXAEBVFGeometry@@AEBVFDragDropEvent@@@Z)
1>Module.RocketCat.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl SWidget::OnDragLeave(class FDragDropEvent const &)" (?OnDragLeave@SWidget@@UEAAXAEBVFDragDropEvent@@@Z)
1>Module.RocketCat.cpp.obj : error LNK2001: unresolved external symbol "public: virtual class FReply __cdecl SWidget::OnDragOver(class FGeometry const &,class FDragDropEvent const &)" (?OnDragOver@SWidget@@UEAA?AVFReply@@AEBVFGeometry@@AEBVFDragDropEvent@@@Z)
1>Module.RocketCat.cpp.obj : error LNK2001: unresolved external symbol "public: virtual class FReply __cdecl SWidget::OnDrop(class FGeometry const &,class FDragDropEvent const &)" (?OnDrop@SWidget@@UEAA?AVFReply@@AEBVFGeometry@@AEBVFDragDropEvent@@@Z)
1>Module.RocketCat.cpp.obj : error LNK2001: unresolved external symbol "public: virtual bool __cdecl SWidget::OnHitTest(class FGeometry const &,struct FVector2D)" (?OnHitTest@SWidget@@UEAA_NAEBVFGeometry@@UFVector2D@@@Z)
1>Module.RocketCat.cpp.obj : error LNK2001: unresolved external symbol "public: virtual class FReply __cdecl SWidget::OnKeyChar(class FGeometry const &,class FCharacterEvent const &)" (?OnKeyChar@SWidget@@UEAA?AVFReply@@AEBVFGeometry@@AEBVFCharacterEvent@@@Z)
1>Module.RocketCat.cpp.obj : error LNK2001: unresolved external symbol "public: virtual class FReply __cdecl SWidget::OnKeyUp(class FGeometry const &,class FKeyboardEvent const &)" (?OnKeyUp@SWidget@@UEAA?AVFReply@@AEBVFGeometry@@AEBVFKeyboardEvent@@@Z)
1>Module.RocketCat.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl SWidget::OnKeyboardFocusChanging(class FWeakWidgetPath const &,class FWidgetPath const &)" (?OnKeyboardFocusChanging@SWidget@@UEAAXAEBVFWeakWidgetPath@@AEBVFWidgetPath@@@Z)
1>Module.RocketCat.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl SWidget::OnKeyboardFocusLost(class FKeyboardFocusEvent const &)" (?OnKeyboardFocusLost@SWidget@@UEAAXAEBVFKeyboardFocusEvent@@@Z)
1>Module.RocketCat.cpp.obj : error LNK2001: unresolved external symbol "public: virtual class FReply __cdecl SWidget::OnMotionDetected(class FGeometry const &,class FMotionEvent const &)" (?OnMotionDetected@SWidget@@UEAA?AVFReply@@AEBVFGeometry@@AEBVFMotionEvent@@@Z)
1>Module.RocketCat.cpp.obj : error LNK2001: unresolved external symbol "public: virtual class FReply __cdecl SWidget::OnMouseButtonDoubleClick(class FGeometry const &,class FPointerEvent const &)" (?OnMouseButtonDoubleClick@SWidget@@UEAA?AVFReply@@AEBVFGeometry@@AEBVFPointerEvent@@@Z)
1>Module.RocketCat.cpp.obj : error LNK2001: unresolved external symbol "public: virtual class FReply __cdecl SWidget::OnMouseButtonUp(class FGeometry const &,class FPointerEvent const &)" (?OnMouseButtonUp@SWidget@@UEAA?AVFReply@@AEBVFGeometry@@AEBVFPointerEvent@@@Z)
1>Module.RocketCat.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl SWidget::OnMouseEnter(class FGeometry const &,class FPointerEvent const &)" (?OnMouseEnter@SWidget@@UEAAXAEBVFGeometry@@AEBVFPointerEvent@@@Z)
1>Module.RocketCat.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl SWidget::OnMouseLeave(class FPointerEvent const &)" (?OnMouseLeave@SWidget@@UEAAXAEBVFPointerEvent@@@Z)
1>Module.RocketCat.cpp.obj : error LNK2001: unresolved external symbol "public: virtual class FReply __cdecl SWidget::OnMouseMove(class FGeometry const &,class FPointerEvent const &)" (?OnMouseMove@SWidget@@UEAA?AVFReply@@AEBVFGeometry@@AEBVFPointerEvent@@@Z)
1>Module.RocketCat.cpp.obj : error LNK2001: unresolved external symbol "public: virtual class FReply __cdecl SWidget::OnMouseWheel(class FGeometry const &,class FPointerEvent const &)" (?OnMouseWheel@SWidget@@UEAA?AVFReply@@AEBVFGeometry@@AEBVFPointerEvent@@@Z)
1>Module.RocketCat.cpp.obj : error LNK2001: unresolved external symbol "public: virtual int __cdecl SCompoundWidget::OnPaint(class FGeometry const &,class FSlateRect const &,class FSlateWindowElementList &,int,class FWidgetStyle const &,bool)const " (?OnPaint@SCompoundWidget@@UEBAHAEBVFGeometry@@AEBVFSlateRect@@AEAVFSlateWindowElementList@@HAEBVFWidgetStyle@@_N@Z)
1>Module.RocketCat.cpp.obj : error LNK2001: unresolved external symbol "public: virtual class FReply __cdecl SWidget::OnPreviewKeyDown(class FGeometry const &,class FKeyboardEvent const &)" (?OnPreviewKeyDown@SWidget@@UEAA?AVFReply@@AEBVFGeometry@@AEBVFKeyboardEvent@@@Z)
1>Module.RocketCat.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl SWidget::OnToolTipClosing(void)" (?OnToolTipClosing@SWidget@@UEAAXXZ)
1>Module.RocketCat.cpp.obj : error LNK2001: unresolved external symbol "public: virtual class FReply __cdecl SWidget::OnTouchEnded(class FGeometry const &,class FPointerEvent const &)" (?OnTouchEnded@SWidget@@UEAA?AVFReply@@AEBVFGeometry@@AEBVFPointerEvent@@@Z)
1>Module.RocketCat.cpp.obj : error LNK2001: unresolved external symbol "public: virtual class FReply __cdecl SWidget::OnTouchMoved(class FGeometry const &,class FPointerEvent const &)" (?OnTouchMoved@SWidget@@UEAA?AVFReply@@AEBVFGeometry@@AEBVFPointerEvent@@@Z)
1>Module.RocketCat.cpp.obj : error LNK2001: unresolved external symbol "public: virtual class FReply __cdecl SWidget::OnTouchStarted(class FGeometry const &,class FPointerEvent const &)" (?OnTouchStarted@SWidget@@UEAA?AVFReply@@AEBVFGeometry@@AEBVFPointerEvent@@@Z)
1>Module.RocketCat.cpp.obj : error LNK2001: unresolved external symbol "public: virtual struct FWidgetSignature const __cdecl SWidget::QueryWidgetTag(void)const " (?QueryWidgetTag@SWidget@@UEBA?BUFWidgetSignature@@XZ)
1>Module.RocketCat.cpp.obj : error LNK2001: unresolved external symbol "public: virtual class FString __cdecl SWidget::ToString(void)const " (?ToString@SWidget@@UEBA?AVFString@@XZ)
1>Module.RocketCat.cpp.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static struct EVisibility const EVisibility::Visible" (__imp_?Visible@EVisibility@@2U1@B)
1>Module.RocketCat.cpp.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static struct EVisibility const EVisibility::Hidden" (__imp_?Hidden@EVisibility@@2U1@B)
1>D:\Development\RocketCat\Binaries\Win64\RocketEditor-RocketCat-Win64-Debug.dll : fatal error LNK1120: 52 unresolved externals
1>  -------- End Detailed Actions Stats -----------------------------------------------------------
1>ERROR : UBT error : Failed to produce item: D:\Development\RocketCat\Binaries\Win64\RocketEditor-RocketCat-Win64-Debug.dll
1>  Cumulative action seconds (8 processors): 0.00 building projects, 25.69 compiling, 0.00 creating app bundles, 0.00 generating debug info, 0.34 linking, 0.00 other
1>  UBT execution time: 30.09 seconds
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.MakeFile.Targets(38,5): error MSB3073: The command ""C:\Program Files\Rocket\Engine\Binaries\DotNET\RocketUnrealBuildTool.exe" RocketCat Win64 Debug -rocket="D:\Development\RocketCat\RocketCat.uproject"" exited with code 1.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

The offending calls are:

SAssignNew(MyHUDMenuWidget, SClearOverlayWidget).OwnerHUD(this);
FSlateApplication::Get().SetFocusToGameViewport();

In my HUD class BuildMenuWIdgets function. I am wondering if I did not override some things in the Widget that need to be.

In your projects build.cs file did you ensure that slate is a dependency module?

I.E. PrivateDependencyModuleNames.Add(“Slate”);

1 Like