Link errors in UBTTaskNode classes

After converting my project to 4.12 I have link errors in 2 of my UBTTaskNode classes:

2>AllowNextMarker.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl IGameplayTaskOwnerInterface::OnGameplayTaskActivated(class UGameplayTask &)" (?OnGameplayTaskActivated@IGameplayTaskOwnerInterface@@UEAAXAEAVUGameplayTask@@@Z)


#pragma once

#include "BehaviorTree/BTTaskNode.h"
#include "AllowNextMarker.generated.h"

class GAME_API UAllowNextMarker : public UBTTaskNode
		EBTNodeResult::Type ExecuteTask(UBehaviorTreeComponent & OwnerComp, uint8 * NodeMemory) override;

I am having similar issues and would equally appreciate some assistance with why 4.12 is causing this.

This is a known issue with changing to 4.12 and using tasks. It can be resolved by simply adding “GameplayTasks” to the PublicDependencyModuleNames section inside your ‘ProjectName’.Build.cs For example:

PublicDependencyModuleNames.AddRange(new string[] { “Core”, “CoreUObject”, “Engine”, “InputCore”, “AIModule”, “GameplayTasks” });

1 Like

Life saver. Thanks!



Thanks so much.

Thank you so much!

Thanks you!

Thank you, and when will this be fixed?

life saver thx.

4.19 still has this issue. but I’m a bit curious. I have another .cpp and .h that use the
virtual EBTNodeResult::Type ExecuteTask(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory) override;

but cause no issues. Why is that?

THANKS!!! Life saver!

OMG Thanks I’ve been struggling with this for an hour trying to dig through my project and linker settings. You’re a real hero.

A true hero :wink: Thanks man!

Thank you kindly for saving me a bunch of frustration

It will throw this error in 5.0.2 as well when you add any class of type BTTask_BlackBoardBase. This one I would consider moderately evil considering that there is not a good way to really understand why this is happening or even where to begin to look to resolve it.