Description

This is not a regression Tested in //UE5/Release-5.0 CL20979098

Creating a new C++ class derived from the Abilty Task from the Gameplay Ability System plugin fails to compile.

From the Live Coding output:

Building patch from 8 file(s) for Live coding module C:\Users\PatrickBryant\Documents\Unreal Projects\LQA00490326\Binaries\Win64\UnrealEditor-LQA00490326.dll
   Creating library C:\Users\PatrickBryant\Documents\Unreal Projects\LQA00490326\Binaries\Win64\UnrealEditor-LQA00490326.patch_0.lib and object C:\Users\PatrickBryant\Documents\Unreal Projects\LQA00490326\Binaries\Win64\UnrealEditor-LQA00490326.patch_0.exp
MyAbilityTask.gen.cpp.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static wchar_t const * __cdecl UGameplayTask::StaticConfigName(void)" (__imp_?StaticConfigName@UGameplayTask@@SAPEB_WXZ) referenced in function "private: static class UClass * __cdecl UMyAbilityTask::GetPrivateStaticClass(void)" (?GetPrivateStaticClass@UMyAbilityTask@@CAPEAVUClass@@XZ)
  Hint on symbols that are defined and could potentially match:
    "__declspec(dllimport) public: static wchar_t const * __cdecl AActor::StaticConfigName(void)" (__imp_?StaticConfigName@AActor@@SAPEB_WXZ)
MyAbilityTask.gen.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl IGameplayTaskOwnerInterface::OnGameplayTaskActivated(class UGameplayTask &)" (?OnGameplayTaskActivated@IGameplayTaskOwnerInterface@@UEAAXAEAVUGameplayTask@@@Z)
MyAbilityTask.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl IGameplayTaskOwnerInterface::OnGameplayTaskActivated(class UGameplayTask &)" (?OnGameplayTaskActivated@IGameplayTaskOwnerInterface@@UEAAXAEAVUGameplayTask@@@Z)
MyAbilityTask.gen.cpp.obj : error LNK2001: unresolved external symbol "public: virtual class UObject * __cdecl UGameplayTask::_getUObject(void)const " (?_getUObject@UGameplayTask@@UEBAPEAVUObject@@XZ)
MyAbilityTask.cpp.obj : error LNK2001: unresolved external symbol "public: virtual class UObject * __cdecl UGameplayTask::_getUObject(void)const " (?_getUObject@UGameplayTask@@UEBAPEAVUObject@@XZ)
MyAbilityTask.gen.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl UGameplayTask::TickTask(float)" (?TickTask@UGameplayTask@@UEAAXM@Z)
MyAbilityTask.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl UGameplayTask::TickTask(float)" (?TickTask@UGameplayTask@@UEAAXM@Z)
MyAbilityTask.gen.cpp.obj : error LNK2001: unresolved external symbol "public: virtual bool __cdecl UGameplayTask::IsSupportedForNetworking(void)const " (?IsSupportedForNetworking@UGameplayTask@@UEBA_NXZ)
MyAbilityTask.cpp.obj : error LNK2001: unresolved external symbol "public: virtual bool __cdecl UGameplayTask::IsSupportedForNetworking(void)const " (?IsSupportedForNetworking@UGameplayTask@@UEBA_NXZ)
MyAbilityTask.gen.cpp.obj : error LNK2001: unresolved external symbol "protected: virtual void __cdecl UGameplayTask::OnGameplayTaskDeactivated(class UGameplayTask &)" (?OnGameplayTaskDeactivated@UGameplayTask@@MEAAXAEAV1@@Z)
MyAbilityTask.cpp.obj : error LNK2001: unresolved external symbol "protected: virtual void __cdecl UGameplayTask::OnGameplayTaskDeactivated(class UGameplayTask &)" (?OnGameplayTaskDeactivated@UGameplayTask@@MEAAXAEAV1@@Z)
MyAbilityTask.gen.cpp.obj : error LNK2001: unresolved external symbol "protected: virtual void __cdecl UGameplayTask::OnGameplayTaskInitialized(class UGameplayTask &)" (?OnGameplayTaskInitialized@UGameplayTask@@MEAAXAEAV1@@Z)
MyAbilityTask.cpp.obj : error LNK2001: unresolved external symbol "protected: virtual void __cdecl UGameplayTask::OnGameplayTaskInitialized(class UGameplayTask &)" (?OnGameplayTaskInitialized@UGameplayTask@@MEAAXAEAV1@@Z)
MyAbilityTask.gen.cpp.obj : error LNK2001: unresolved external symbol "protected: virtual unsigned char __cdecl UGameplayTask::GetGameplayTaskDefaultPriority(void)const " (?GetGameplayTaskDefaultPriority@UGameplayTask@@MEBAEXZ)
MyAbilityTask.cpp.obj : error LNK2001: unresolved external symbol "protected: virtual unsigned char __cdecl UGameplayTask::GetGameplayTaskDefaultPriority(void)const " (?GetGameplayTaskDefaultPriority@UGameplayTask@@MEBAEXZ)
MyAbilityTask.gen.cpp.obj : error LNK2001: unresolved external symbol "protected: virtual class AActor * __cdecl UGameplayTask::GetGameplayTaskAvatar(class UGameplayTask const *)const " (?GetGameplayTaskAvatar@UGameplayTask@@MEBAPEAVAActor@@PEBV1@@Z)
MyAbilityTask.cpp.obj : error LNK2001: unresolved external symbol "protected: virtual class AActor * __cdecl UGameplayTask::GetGameplayTaskAvatar(class UGameplayTask const *)const " (?GetGameplayTaskAvatar@UGameplayTask@@MEBAPEAVAActor@@PEBV1@@Z)
MyAbilityTask.gen.cpp.obj : error LNK2001: unresolved external symbol "protected: virtual class AActor * __cdecl UGameplayTask::GetGameplayTaskOwner(class UGameplayTask const *)const " (?GetGameplayTaskOwner@UGameplayTask@@MEBAPEAVAActor@@PEBV1@@Z)
MyAbilityTask.cpp.obj : error LNK2001: unresolved external symbol "protected: virtual class AActor * __cdecl UGameplayTask::GetGameplayTaskOwner(class UGameplayTask const *)const " (?GetGameplayTaskOwner@UGameplayTask@@MEBAPEAVAActor@@PEBV1@@Z)
MyAbilityTask.gen.cpp.obj : error LNK2001: unresolved external symbol "protected: virtual class UGameplayTasksComponent * __cdecl UGameplayTask::GetGameplayTasksComponent(class UGameplayTask const &)const " (?GetGameplayTasksComponent@UGameplayTask@@MEBAPEAVUGameplayTasksComponent@@AEBV1@@Z)
MyAbilityTask.cpp.obj : error LNK2001: unresolved external symbol "protected: virtual class UGameplayTasksComponent * __cdecl UGameplayTask::GetGameplayTasksComponent(class UGameplayTask const &)const " (?GetGameplayTasksComponent@UGameplayTask@@MEBAPEAVUGameplayTasksComponent@@AEBV1@@Z)
MyAbilityTask.gen.cpp.obj : error LNK2001: unresolved external symbol "protected: virtual void __cdecl UGameplayTask::Resume(void)" (?Resume@UGameplayTask@@MEAAXXZ)
MyAbilityTask.cpp.obj : error LNK2001: unresolved external symbol "protected: virtual void __cdecl UGameplayTask::Resume(void)" (?Resume@UGameplayTask@@MEAAXXZ)
MyAbilityTask.gen.cpp.obj : error LNK2001: unresolved external symbol "protected: virtual void __cdecl UGameplayTask::Pause(void)" (?Pause@UGameplayTask@@MEAAXXZ)
MyAbilityTask.cpp.obj : error LNK2001: unresolved external symbol "protected: virtual void __cdecl UGameplayTask::Pause(void)" (?Pause@UGameplayTask@@MEAAXXZ)
MyAbilityTask.gen.cpp.obj : error LNK2001: unresolved external symbol "public: virtual class FString __cdecl UGameplayTask::GetDebugString(void)const " (?GetDebugString@UGameplayTask@@UEBA?AVFString@@XZ)
MyAbilityTask.cpp.obj : error LNK2001: unresolved external symbol "public: virtual class FString __cdecl UGameplayTask::GetDebugString(void)const " (?GetDebugString@UGameplayTask@@UEBA?AVFString@@XZ)
MyAbilityTask.gen.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl UGameplayTask::ExternalCancel(void)" (?ExternalCancel@UGameplayTask@@UEAAXXZ)
MyAbilityTask.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl UGameplayTask::ExternalCancel(void)" (?ExternalCancel@UGameplayTask@@UEAAXXZ)
MyAbilityTask.gen.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl UGameplayTask::ExternalConfirm(bool)" (?ExternalConfirm@UGameplayTask@@UEAAX_N@Z)
MyAbilityTask.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl UGameplayTask::ExternalConfirm(bool)" (?ExternalConfirm@UGameplayTask@@UEAAX_N@Z)
MyAbilityTask.gen.cpp.obj : error LNK2001: unresolved external symbol "protected: virtual void __cdecl UGameplayTask::Activate(void)" (?Activate@UGameplayTask@@MEAAXXZ)
MyAbilityTask.cpp.obj : error LNK2001: unresolved external symbol "protected: virtual void __cdecl UGameplayTask::Activate(void)" (?Activate@UGameplayTask@@MEAAXXZ)
MyAbilityTask.gen.cpp.obj : error LNK2001: unresolved external symbol "public: virtual class UWorld * __cdecl UGameplayTask::GetWorld(void)const " (?GetWorld@UGameplayTask@@UEBAPEAVUWorld@@XZ)
MyAbilityTask.cpp.obj : error LNK2001: unresolved external symbol "public: virtual class UWorld * __cdecl UGameplayTask::GetWorld(void)const " (?GetWorld@UGameplayTask@@UEBAPEAVUWorld@@XZ)
MyAbilityTask.gen.cpp.obj : error LNK2001: unresolved external symbol "public: virtual class FString __cdecl UGameplayTask::GenerateDebugDescription(void)const " (?GenerateDebugDescription@UGameplayTask@@UEBA?AVFString@@XZ)
MyAbilityTask.cpp.obj : error LNK2001: unresolved external symbol "public: virtual class FString __cdecl UGameplayTask::GenerateDebugDescription(void)const " (?GenerateDebugDescription@UGameplayTask@@UEBA?AVFString@@XZ)
C:\Users\PatrickBryant\Documents\Unreal Projects\LQA00490326\Binaries\Win64\UnrealEditor-LQA00490326.patch_0.exe : fatal error LNK1120: 19 unresolved externals
Failed to link patch (0.000s) (Exit code: 0x460)
Steps to Reproduce
  1. Create or open any C++ project
  2. Enable the Gameplay Ability System plugin then restart the editor
  3. Select Tools > New C++ Class
  4. In the wizard select All Classes then search and select AbilityTask then select Next and Create Class
  5. Observe the Live Coding window

Expected Results:
Live Coding is successful.

Actual Results:
Live Coding fails with a Failed to Link patch error

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-169197 in the post.

0
Login to Vote

By Design
ComponentUE - Foundation - Cpp Tools - Live Coding
Affects Versions5.1
Target Fix5.3
CreatedNov 3, 2022
ResolvedMar 3, 2023
UpdatedMar 6, 2023
View Jira Issue