How to fix ADetourCrowdAIController linking errors in c++?

I try to use ADetourCrowdAIController, but it gives linking errors:
Header file:
include “DetourCrowdAIController.h”


Source file:
include “Navigation/CrowdFollowingComponent.h”

Errors:
0>Module.PossessionGame.1.cpp.obj: Error : LNK2019: unresolved external symbol “private: static class UClass * __cdecl ADetourCrowdAIController::GetPrivateStaticClass(void)” (?GetPrivateStaticClass@ADetourCrowdAIController@@CAPEAVUClass@@XZ) referenced in function “public: static class UClass * __cdecl ADetourCrowdAIController::StaticClass(void)” (?StaticClass@ADetourCrowdAIController@@SAPEAVUClass@@XZ)
0>Module.PossessionGame.1.cpp.obj: Error : LNK2019: unresolved external symbol “public: __cdecl ADetourCrowdAIController::ADetourCrowdAIController(class FVTableHelper &)” (??0ADetourCrowdAIController@@QEAA@AEAVFVTableHelper@@@Z) referenced in function “public: __cdecl AEnemyAIController::AEnemyAIController(class FVTableHelper &)” (??0AEnemyAIController@@QEAA@AEAVFVTableHelper@@@Z)
0>Module.PossessionGame.1.cpp.obj: Error : LNK2019: unresolved external symbol “public: virtual __cdecl ADetourCrowdAIController::~ADetourCrowdAIController(void)” (??1ADetourCrowdAIController@@UEAA@XZ) referenced in function “public: virtual __cdecl AEnemyAIController::~AEnemyAIController(void)” (??1AEnemyAIController@@UEAA@XZ)
0>EnemyAIController.cpp.obj: Error : LNK2001: unresolved external symbol “public: virtual __cdecl ADetourCrowdAIController::~ADetourCrowdAIController(void)” (??1ADetourCrowdAIController@@UEAA@XZ)
0>EnemyAIController.cpp.obj: Error : LNK2019: unresolved external symbol “public: __cdecl ADetourCrowdAIController::ADetourCrowdAIController(class FObjectInitializer const &)” (??0ADetourCrowdAIController@@QEAA@AEBVFObjectInitializer@@@Z) referenced in function “public: __cdecl AEnemyAIController::AEnemyAIController(class FObjectInitializer const &)” (??0AEnemyAIController@@QEAA@AEBVFObjectInitializer@@@Z)
0>UnrealEditor-PossessionGame.dll: Error : LNK1120: 4 unresolved externals

In your Build.cs file add AIModule to the PublicDependencyModuleNames array.

It was already added, i fixed the linking errors by doing this:
class POSSESSIONGAME_API AEnemyAIController : public AAIController
instead of ADetourCrowdAIController i inherited from AAIController.

Ah that’s correct, and to get the crowd component you do this in your constructor

AKaiAIController::AKaiAIController(const FObjectInitializer& ObjectInitializer) : Super(ObjectInitializer.SetDefaultSubobjectClass<UCrowdFollowingComponent>(TEXT("PathFollowingComponent")))
{
	
}