Trouble with C++ class inherited from BTNode

Hi all,

UE ask me to recompile the whole project from source whenever I add BTNode or other classes inherit from it. Other C++ classes work alright. Below is the error log:

CompilerResultsLog:Error: Error MyBTTaskNode.cpp.obj : error LNK2001: unresolved external symbol “public: virtual void cdecl IGameplayTaskOwnerInterface::OnGameplayTaskActivated(class UGameplayTask &)” (?OnGameplayTaskActivated@IGameplayTaskOwnerInterface@@UEAAXAEAVUGameplayTask@@@Z)
CompilerResultsLog:Error: Error MyProject.generated.cpp.obj : error LNK2001: unresolved external symbol “public: virtual void cdecl IGameplayTaskOwnerInterface::OnGameplayTaskActivated(class UGameplayTask &)” (?OnGameplayTaskActivated@IGameplayTaskOwnerInterface@@UEAAXAEAVUGameplayTask@@@Z)
CompilerResultsLog:Error: Error E:\UnrealCourse\MyProject\Binaries\Win64\UE4Editor-MyProject-7891.dll : fatal error LNK1120: 1 unresolved externals

How can I fix and avoid this?
Thanks a lot in advance.

Add GameplayTasks module to your project’s dependencies (int the *.Build.cs file).

Cheers,

–mieszko

Solved my problem. Thanks a lot.