npruehs / ue4-rts

Real-time strategy plugin and showcase for Unreal Engine 4.
MIT License
747 stars 151 forks source link

Create an AI controller deriving from RTSPawnAIController #117

Closed volvicTM closed 4 years ago

volvicTM commented 4 years ago

Using UE4.25 and C++ setup.

Following the Manual->Setup under Game Framework Setup, number 7. "Create an AI controller deriving from RTSPawnAIController" results in this compile error:

> 2>     Creating library D:\Development\Programming\Unreal\Examples\RTSPlugin\RTS\Intermediate\Build\Win64\UE4Editor\Development\RTS\UE4Editor-RTS-0002.suppressed.lib and object D:\Development\Programming\Unreal\Examples\RTSPlugin\RTS\Intermediate\Build\Win64\UE4Editor\Development\RTS\UE4Editor-RTS-0002.suppressed.exp
> 2>MyRTSPawnAIController.cpp.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual class UObject * __cdecl AAIController::_getUObject(void)const " (__imp_?_getUObject@AAIController@@UEBAPEAVUObject@@XZ) referenced in function "[thunk]:public: virtual class UObject * __cdecl AAIController::_getUObject`adjustor{128}' (void)const " (?_getUObject@AAIController@@WIA@EBAPEAVUObject@@XZ)
> 2>MyRTSPawnAIController.gen.cpp.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual class UObject * __cdecl AAIController::_getUObject(void)const " (__imp_?_getUObject@AAIController@@UEBAPEAVUObject@@XZ)
> 2>MyRTSPawnAIController.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl AAIController::ActorsPerceptionUpdated(class TArray<class AActor *,class TSizedDefaultAllocator<32> > const &)" (?ActorsPerceptionUpdated@AAIController@@UEAAXAEBV?$TArray@PEAVAActor@@V?$TSizedDefaultAllocator@$0CA@@@@@@Z)
> 2>MyRTSPawnAIController.gen.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl AAIController::ActorsPerceptionUpdated(class TArray<class AActor *,class TSizedDefaultAllocator<32> > const &)" (?ActorsPerceptionUpdated@AAIController@@UEAAXAEBV?$TArray@PEAVAActor@@V?$TSizedDefaultAllocator@$0CA@@@@@@Z)
> 2>MyRTSPawnAIController.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl AAIController::ClearFocus(unsigned char)" (?ClearFocus@AAIController@@UEAAXE@Z)
> 2>MyRTSPawnAIController.gen.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl AAIController::ClearFocus(unsigned char)" (?ClearFocus@AAIController@@UEAAXE@Z)
> 2>MyRTSPawnAIController.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl AAIController::DisplayDebug(class UCanvas *,class FDebugDisplayInfo const &,float &,float &)" (?DisplayDebug@AAIController@@UEAAXPEAVUCanvas@@AEBVFDebugDisplayInfo@@AEAM2@Z)
> 2>MyRTSPawnAIController.gen.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl AAIController::DisplayDebug(class UCanvas *,class FDebugDisplayInfo const &,float &,float &)" (?DisplayDebug@AAIController@@UEAAXPEAVUCanvas@@AEBVFDebugDisplayInfo@@AEAM2@Z)
> 2>MyRTSPawnAIController.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl AAIController::FindPathForMoveRequest(struct FAIMoveRequest const &,struct FPathFindingQuery &,class TSharedPtr<struct FNavigationPath,1> &)const " (?FindPathForMoveRequest@AAIController@@UEBAXAEBUFAIMoveRequest@@AEAUFPathFindingQuery@@AEAV?$TSharedPtr@UFNavigationPath@@$00@@@Z)
> 2>MyRTSPawnAIController.gen.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl AAIController::FindPathForMoveRequest(struct FAIMoveRequest const &,struct FPathFindingQuery &,class TSharedPtr<struct FNavigationPath,1> &)const " (?FindPathForMoveRequest@AAIController@@UEBAXAEBUFAIMoveRequest@@AEAUFPathFindingQuery@@AEAV?$TSharedPtr@UFNavigationPath@@$00@@@Z)
> 2>MyRTSPawnAIController.cpp.obj : error LNK2001: unresolved external symbol "public: virtual class FString __cdecl AAIController::GetDebugIcon(void)const " (?GetDebugIcon@AAIController@@UEBA?AVFString@@XZ)
> 2>MyRTSPawnAIController.gen.cpp.obj : error LNK2001: unresolved external symbol "public: virtual class FString __cdecl AAIController::GetDebugIcon(void)const " (?GetDebugIcon@AAIController@@UEBA?AVFString@@XZ)
> 2>MyRTSPawnAIController.cpp.obj : error LNK2001: unresolved external symbol "public: virtual struct FVector __cdecl AAIController::GetFocalPointOnActor(class AActor const *)const " (?GetFocalPointOnActor@AAIController@@UEBA?AUFVector@@PEBVAActor@@@Z)
> 2>MyRTSPawnAIController.gen.cpp.obj : error LNK2001: unresolved external symbol "public: virtual struct FVector __cdecl AAIController::GetFocalPointOnActor(class AActor const *)const " (?GetFocalPointOnActor@AAIController@@UEBA?AUFVector@@PEBVAActor@@@Z)
> 2>MyRTSPawnAIController.cpp.obj : error LNK2001: unresolved external symbol "public: virtual class AActor * __cdecl AAIController::GetGameplayTaskAvatar(class UGameplayTask const *)const " (?GetGameplayTaskAvatar@AAIController@@UEBAPEAVAActor@@PEBVUGameplayTask@@@Z)
> 2>MyRTSPawnAIController.gen.cpp.obj : error LNK2001: unresolved external symbol "public: virtual class AActor * __cdecl AAIController::GetGameplayTaskAvatar(class UGameplayTask const *)const " (?GetGameplayTaskAvatar@AAIController@@UEBAPEAVAActor@@PEBVUGameplayTask@@@Z)
> 2>MyRTSPawnAIController.cpp.obj : error LNK2001: unresolved external symbol "public: virtual unsigned char __cdecl AAIController::GetGameplayTaskDefaultPriority(void)const " (?GetGameplayTaskDefaultPriority@AAIController@@UEBAEXZ)
> 2>MyRTSPawnAIController.gen.cpp.obj : error LNK2001: unresolved external symbol "public: virtual unsigned char __cdecl AAIController::GetGameplayTaskDefaultPriority(void)const " (?GetGameplayTaskDefaultPriority@AAIController@@UEBAEXZ)
> 2>MyRTSPawnAIController.cpp.obj : error LNK2001: unresolved external symbol "public: virtual class AActor * __cdecl AAIController::GetGameplayTaskOwner(class UGameplayTask const *)const " (?GetGameplayTaskOwner@AAIController@@UEBAPEAVAActor@@PEBVUGameplayTask@@@Z)
> 2>MyRTSPawnAIController.gen.cpp.obj : error LNK2001: unresolved external symbol "public: virtual class AActor * __cdecl AAIController::GetGameplayTaskOwner(class UGameplayTask const *)const " (?GetGameplayTaskOwner@AAIController@@UEBAPEAVAActor@@PEBVUGameplayTask@@@Z)
> 2>MyRTSPawnAIController.cpp.obj : error LNK2001: unresolved external symbol "public: virtual class UGameplayTasksComponent * __cdecl AAIController::GetGameplayTasksComponent(class UGameplayTask const &)const " (?GetGameplayTasksComponent@AAIController@@UEBAPEAVUGameplayTasksComponent@@AEBVUGameplayTask@@@Z)
> 2>MyRTSPawnAIController.gen.cpp.obj : error LNK2001: unresolved external symbol "public: virtual class UGameplayTasksComponent * __cdecl AAIController::GetGameplayTasksComponent(class UGameplayTask const &)const " (?GetGameplayTasksComponent@AAIController@@UEBAPEAVUGameplayTasksComponent@@AEBVUGameplayTask@@@Z)
> 2>MyRTSPawnAIController.cpp.obj : error LNK2001: unresolved external symbol "public: virtual struct FGenericTeamId __cdecl AAIController::GetGenericTeamId(void)const " (?GetGenericTeamId@AAIController@@UEBA?AUFGenericTeamId@@XZ)
> 2>MyRTSPawnAIController.gen.cpp.obj : error LNK2001: unresolved external symbol "public: virtual struct FGenericTeamId __cdecl AAIController::GetGenericTeamId(void)const " (?GetGenericTeamId@AAIController@@UEBA?AUFGenericTeamId@@XZ)
> 2>MyRTSPawnAIController.cpp.obj : error LNK2001: unresolved external symbol "public: virtual class IPathFollowingAgentInterface * __cdecl AAIController::GetPathFollowingAgent(void)const " (?GetPathFollowingAgent@AAIController@@UEBAPEAVIPathFollowingAgentInterface@@XZ)
> 2>MyRTSPawnAIController.gen.cpp.obj : error LNK2001: unresolved external symbol "public: virtual class IPathFollowingAgentInterface * __cdecl AAIController::GetPathFollowingAgent(void)const " (?GetPathFollowingAgent@AAIController@@UEBAPEAVIPathFollowingAgentInterface@@XZ)
> 2>MyRTSPawnAIController.cpp.obj : error LNK2001: unresolved external symbol "public: virtual class UAIPerceptionComponent * __cdecl AAIController::GetPerceptionComponent(void)" (?GetPerceptionComponent@AAIController@@UEAAPEAVUAIPerceptionComponent@@XZ)
> 2>MyRTSPawnAIController.gen.cpp.obj : error LNK2001: unresolved external symbol "public: virtual class UAIPerceptionComponent * __cdecl AAIController::GetPerceptionComponent(void)" (?GetPerceptionComponent@AAIController@@UEAAPEAVUAIPerceptionComponent@@XZ)
> 2>MyRTSPawnAIController.cpp.obj : error LNK2001: unresolved external symbol "public: virtual enum ETeamAttitude::Type __cdecl IGenericTeamAgentInterface::GetTeamAttitudeTowards(class AActor const &)const " (?GetTeamAttitudeTowards@IGenericTeamAgentInterface@@UEBA?AW4Type@ETeamAttitude@@AEBVAActor@@@Z)
> 2>MyRTSPawnAIController.gen.cpp.obj : error LNK2001: unresolved external symbol "public: virtual enum ETeamAttitude::Type __cdecl IGenericTeamAgentInterface::GetTeamAttitudeTowards(class AActor const &)const " (?GetTeamAttitudeTowards@IGenericTeamAgentInterface@@UEBA?AW4Type@ETeamAttitude@@AEBVAActor@@@Z)
> 2>MyRTSPawnAIController.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl AAIController::GrabDebugSnapshot(struct FVisualLogEntry *)const " (?GrabDebugSnapshot@AAIController@@UEBAXPEAUFVisualLogEntry@@@Z)
> 2>MyRTSPawnAIController.gen.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl AAIController::GrabDebugSnapshot(struct FVisualLogEntry *)const " (?GrabDebugSnapshot@AAIController@@UEBAXPEAUFVisualLogEntry@@@Z)
> 2>MyRTSPawnAIController.cpp.obj : error LNK2001: unresolved external symbol "protected: virtual bool __cdecl AAIController::InitializeBlackboard(class UBlackboardComponent &,class UBlackboardData &)" (?InitializeBlackboard@AAIController@@MEAA_NAEAVUBlackboardComponent@@AEAVUBlackboardData@@@Z)
> 2>MyRTSPawnAIController.gen.cpp.obj : error LNK2001: unresolved external symbol "protected: virtual bool __cdecl AAIController::InitializeBlackboard(class UBlackboardComponent &,class UBlackboardData &)" (?InitializeBlackboard@AAIController@@MEAA_NAEAVUBlackboardComponent@@AEAVUBlackboardData@@@Z)
> 2>MyRTSPawnAIController.cpp.obj : error LNK2001: unresolved external symbol "public: virtual bool __cdecl AAIController::IsFollowingAPath(void)const " (?IsFollowingAPath@AAIController@@UEBA_NXZ)
> 2>MyRTSPawnAIController.gen.cpp.obj : error LNK2001: unresolved external symbol "public: virtual bool __cdecl AAIController::IsFollowingAPath(void)const " (?IsFollowingAPath@AAIController@@UEBA_NXZ)
> 2>MyRTSPawnAIController.cpp.obj : error LNK2001: unresolved external symbol "public: virtual bool __cdecl AAIController::LineOfSightTo(class AActor const *,struct FVector,bool)const " (?LineOfSightTo@AAIController@@UEBA_NPEBVAActor@@UFVector@@_N@Z)
> 2>MyRTSPawnAIController.gen.cpp.obj : error LNK2001: unresolved external symbol "public: virtual bool __cdecl AAIController::LineOfSightTo(class AActor const *,struct FVector,bool)const " (?LineOfSightTo@AAIController@@UEBA_NPEBVAActor@@UFVector@@_N@Z)
> 2>MyRTSPawnAIController.cpp.obj : error LNK2001: unresolved external symbol "public: virtual struct FPathFollowingRequestResult __cdecl AAIController::MoveTo(struct FAIMoveRequest const &,class TSharedPtr<struct FNavigationPath,1> *)" (?MoveTo@AAIController@@UEAA?AUFPathFollowingRequestResult@@AEBUFAIMoveRequest@@PEAV?$TSharedPtr@UFNavigationPath@@$00@@@Z)
> 2>MyRTSPawnAIController.gen.cpp.obj : error LNK2001: unresolved external symbol "public: virtual struct FPathFollowingRequestResult __cdecl AAIController::MoveTo(struct FAIMoveRequest const &,class TSharedPtr<struct FNavigationPath,1> *)" (?MoveTo@AAIController@@UEAA?AUFPathFollowingRequestResult@@AEBUFAIMoveRequest@@PEAV?$TSharedPtr@UFNavigationPath@@$00@@@Z)
> 2>MyRTSPawnAIController.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl AAIController::OnGameplayTaskActivated(class UGameplayTask &)" (?OnGameplayTaskActivated@AAIController@@UEAAXAEAVUGameplayTask@@@Z)
> 2>MyRTSPawnAIController.gen.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl AAIController::OnGameplayTaskActivated(class UGameplayTask &)" (?OnGameplayTaskActivated@AAIController@@UEAAXAEAVUGameplayTask@@@Z)
> 2>MyRTSPawnAIController.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl AAIController::OnGameplayTaskDeactivated(class UGameplayTask &)" (?OnGameplayTaskDeactivated@AAIController@@UEAAXAEAVUGameplayTask@@@Z)
> 2>MyRTSPawnAIController.gen.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl AAIController::OnGameplayTaskDeactivated(class UGameplayTask &)" (?OnGameplayTaskDeactivated@AAIController@@UEAAXAEAVUGameplayTask@@@Z)
> 2>MyRTSPawnAIController.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl AAIController::OnGameplayTaskInitialized(class UGameplayTask &)" (?OnGameplayTaskInitialized@AAIController@@UEAAXAEAVUGameplayTask@@@Z)
> 2>MyRTSPawnAIController.gen.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl AAIController::OnGameplayTaskInitialized(class UGameplayTask &)" (?OnGameplayTaskInitialized@AAIController@@UEAAXAEAVUGameplayTask@@@Z)
> 2>MyRTSPawnAIController.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl AAIController::OnGameplayTaskResourcesClaimed(struct FGameplayResourceSet,struct FGameplayResourceSet)" (?OnGameplayTaskResourcesClaimed@AAIController@@UEAAXUFGameplayResourceSet@@0@Z)
> 2>MyRTSPawnAIController.gen.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl AAIController::OnGameplayTaskResourcesClaimed(struct FGameplayResourceSet,struct FGameplayResourceSet)" (?OnGameplayTaskResourcesClaimed@AAIController@@UEAAXUFGameplayResourceSet@@0@Z)
> 2>MyRTSPawnAIController.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl AAIController::OnMoveCompleted(struct FAIRequestID,struct FPathFollowingResult const &)" (?OnMoveCompleted@AAIController@@UEAAXUFAIRequestID@@AEBUFPathFollowingResult@@@Z)
> 2>MyRTSPawnAIController.gen.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl AAIController::OnMoveCompleted(struct FAIRequestID,struct FPathFollowingResult const &)" (?OnMoveCompleted@AAIController@@UEAAXUFAIRequestID@@AEBUFPathFollowingResult@@@Z)
> 2>MyRTSPawnAIController.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl AAIController::OnMoveCompleted(struct FAIRequestID,enum EPathFollowingResult::Type)" (?OnMoveCompleted@AAIController@@UEAAXUFAIRequestID@@W4Type@EPathFollowingResult@@@Z)
> 2>MyRTSPawnAIController.gen.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl AAIController::OnMoveCompleted(struct FAIRequestID,enum EPathFollowingResult::Type)" (?OnMoveCompleted@AAIController@@UEAAXUFAIRequestID@@W4Type@EPathFollowingResult@@@Z)
> 2>MyRTSPawnAIController.cpp.obj : error LNK2001: unresolved external symbol "protected: virtual void __cdecl AAIController::OnUnPossess(void)" (?OnUnPossess@AAIController@@MEAAXXZ)
> 2>MyRTSPawnAIController.gen.cpp.obj : error LNK2001: unresolved external symbol "protected: virtual void __cdecl AAIController::OnUnPossess(void)" (?OnUnPossess@AAIController@@MEAAXXZ)
> 2>MyRTSPawnAIController.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl AAIController::PostInitializeComponents(void)" (?PostInitializeComponents@AAIController@@UEAAXXZ)
> 2>MyRTSPawnAIController.gen.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl AAIController::PostInitializeComponents(void)" (?PostInitializeComponents@AAIController@@UEAAXXZ)
> 2>MyRTSPawnAIController.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl AAIController::PostRegisterAllComponents(void)" (?PostRegisterAllComponents@AAIController@@UEAAXXZ)
> 2>MyRTSPawnAIController.gen.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl AAIController::PostRegisterAllComponents(void)" (?PostRegisterAllComponents@AAIController@@UEAAXXZ)
> 2>MyRTSPawnAIController.cpp.obj : error LNK2001: unresolved external symbol "public: virtual bool __cdecl AAIController::PreparePathfinding(struct FAIMoveRequest const &,struct FPathFindingQuery &)" (?PreparePathfinding@AAIController@@UEAA_NAEBUFAIMoveRequest@@AEAUFPathFindingQuery@@@Z)
> 2>MyRTSPawnAIController.gen.cpp.obj : error LNK2001: unresolved external symbol "public: virtual bool __cdecl AAIController::PreparePathfinding(struct FAIMoveRequest const &,struct FPathFindingQuery &)" (?PreparePathfinding@AAIController@@UEAA_NAEBUFAIMoveRequest@@AEAUFPathFindingQuery@@@Z)
> 2>MyRTSPawnAIController.cpp.obj : error LNK2001: unresolved external symbol "public: virtual struct FAIRequestID __cdecl AAIController::RequestMove(struct FAIMoveRequest const &,class TSharedPtr<struct FNavigationPath,1>)" (?RequestMove@AAIController@@UEAA?AUFAIRequestID@@AEBUFAIMoveRequest@@V?$TSharedPtr@UFNavigationPath@@$00@@@Z)
> 2>MyRTSPawnAIController.gen.cpp.obj : error LNK2001: unresolved external symbol "public: virtual struct FAIRequestID __cdecl AAIController::RequestMove(struct FAIMoveRequest const &,class TSharedPtr<struct FNavigationPath,1>)" (?RequestMove@AAIController@@UEAA?AUFAIRequestID@@AEBUFAIMoveRequest@@V?$TSharedPtr@UFNavigationPath@@$00@@@Z)
> 2>MyRTSPawnAIController.cpp.obj : error LNK2001: unresolved external symbol "public: virtual struct FAIRequestID __cdecl AAIController::RequestPathAndMove(struct FAIMoveRequest const &,struct FPathFindingQuery &)" (?RequestPathAndMove@AAIController@@UEAA?AUFAIRequestID@@AEBUFAIMoveRequest@@AEAUFPathFindingQuery@@@Z)
> 2>MyRTSPawnAIController.gen.cpp.obj : error LNK2001: unresolved external symbol "public: virtual struct FAIRequestID __cdecl AAIController::RequestPathAndMove(struct FAIMoveRequest const &,struct FPathFindingQuery &)" (?RequestPathAndMove@AAIController@@UEAA?AUFAIRequestID@@AEBUFAIMoveRequest@@AEAUFPathFindingQuery@@@Z)
> 2>MyRTSPawnAIController.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl AAIController::Reset(void)" (?Reset@AAIController@@UEAAXXZ)
> 2>MyRTSPawnAIController.gen.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl AAIController::Reset(void)" (?Reset@AAIController@@UEAAXXZ)
> 2>MyRTSPawnAIController.cpp.obj : error LNK2001: unresolved external symbol "public: virtual bool __cdecl AAIController::RunBehaviorTree(class UBehaviorTree *)" (?RunBehaviorTree@AAIController@@UEAA_NPEAVUBehaviorTree@@@Z)
> 2>MyRTSPawnAIController.gen.cpp.obj : error LNK2001: unresolved external symbol "public: virtual bool __cdecl AAIController::RunBehaviorTree(class UBehaviorTree *)" (?RunBehaviorTree@AAIController@@UEAA_NPEAVUBehaviorTree@@@Z)
> 2>MyRTSPawnAIController.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl AAIController::SetFocalPoint(struct FVector,unsigned char)" (?SetFocalPoint@AAIController@@UEAAXUFVector@@E@Z)
> 2>MyRTSPawnAIController.gen.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl AAIController::SetFocalPoint(struct FVector,unsigned char)" (?SetFocalPoint@AAIController@@UEAAXUFVector@@E@Z)
> 2>MyRTSPawnAIController.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl AAIController::SetFocus(class AActor *,unsigned char)" (?SetFocus@AAIController@@UEAAXPEAVAActor@@E@Z)
> 2>MyRTSPawnAIController.gen.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl AAIController::SetFocus(class AActor *,unsigned char)" (?SetFocus@AAIController@@UEAAXPEAVAActor@@E@Z)
> 2>MyRTSPawnAIController.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl AAIController::SetGenericTeamId(struct FGenericTeamId const &)" (?SetGenericTeamId@AAIController@@UEAAXAEBUFGenericTeamId@@@Z)
> 2>MyRTSPawnAIController.gen.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl AAIController::SetGenericTeamId(struct FGenericTeamId const &)" (?SetGenericTeamId@AAIController@@UEAAXAEBUFGenericTeamId@@@Z)
> 2>MyRTSPawnAIController.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl AAIController::SetPawn(class APawn *)" (?SetPawn@AAIController@@UEAAXPEAVAPawn@@@Z)
> 2>MyRTSPawnAIController.gen.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl AAIController::SetPawn(class APawn *)" (?SetPawn@AAIController@@UEAAXPEAVAPawn@@@Z)
> 2>MyRTSPawnAIController.cpp.obj : error LNK2001: unresolved external symbol "public: virtual bool __cdecl AAIController::ShouldPostponePathUpdates(void)const " (?ShouldPostponePathUpdates@AAIController@@UEBA_NXZ)
> 2>MyRTSPawnAIController.gen.cpp.obj : error LNK2001: unresolved external symbol "public: virtual bool __cdecl AAIController::ShouldPostponePathUpdates(void)const " (?ShouldPostponePathUpdates@AAIController@@UEBA_NXZ)
> 2>MyRTSPawnAIController.cpp.obj : error LNK2001: unresolved external symbol "public: virtual bool __cdecl AAIController::ShouldSyncBlackboardWith(class UBlackboardComponent const &)const " (?ShouldSyncBlackboardWith@AAIController@@UEBA_NAEBVUBlackboardComponent@@@Z)
> 2>MyRTSPawnAIController.gen.cpp.obj : error LNK2001: unresolved external symbol "public: virtual bool __cdecl AAIController::ShouldSyncBlackboardWith(class UBlackboardComponent const &)const " (?ShouldSyncBlackboardWith@AAIController@@UEBA_NAEBVUBlackboardComponent@@@Z)
> 2>MyRTSPawnAIController.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl AAIController::StopMovement(void)" (?StopMovement@AAIController@@UEAAXXZ)
> 2>MyRTSPawnAIController.gen.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl AAIController::StopMovement(void)" (?StopMovement@AAIController@@UEAAXXZ)
> 2>MyRTSPawnAIController.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl AAIController::Tick(float)" (?Tick@AAIController@@UEAAXM@Z)
> 2>MyRTSPawnAIController.gen.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl AAIController::Tick(float)" (?Tick@AAIController@@UEAAXM@Z)
> 2>MyRTSPawnAIController.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl AAIController::UpdateControlRotation(float,bool)" (?UpdateControlRotation@AAIController@@UEAAXM_N@Z)
> 2>MyRTSPawnAIController.gen.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl AAIController::UpdateControlRotation(float,bool)" (?UpdateControlRotation@AAIController@@UEAAXM_N@Z)
> 2>MyRTSPawnAIController.cpp.obj : error LNK2001: unresolved external symbol "public: virtual class UObject * __cdecl AAIController::_getUObject(void)const " (?_getUObject@AAIController@@UEBAPEAVUObject@@XZ)
> 2>MyRTSPawnAIController.gen.cpp.obj : error LNK2001: unresolved external symbol "public: virtual class UObject * __cdecl AAIController::_getUObject(void)const " (?_getUObject@AAIController@@UEBAPEAVUObject@@XZ)
> 2>D:\Development\Programming\Unreal\Examples\RTSPlugin\RTS\Binaries\Win64\UE4Editor-RTS-0002.dll : fatal error LNK1120: 44 unresolved externals`

Other classes build fine up until this point. Have started a new project, same result.

npruehs commented 4 years ago

Hey @volvicTM!

This is, in fact, a linker error, not a compiler error, caused because you're missing dependency modules for your case.

As you're extending ARTSPawnAIController, you're extending AAIController as well.

I was able to reproduce your issue, and adding AIModule to the PublicDependencyModuleNames of the Build.cs file of my project fixed it. I've updated the documentation in f4482fbe6de494e89515c3f7217d56c45be90ada as well to reflect that.

Please let me know if you've got any further questions!

Best regards, Nick

volvicTM commented 4 years ago

Thank you for correcting me, and that indeed did solve the issue!

Good project you have here, thanks for your contribution to the community. Once I get a grasp of it I will attempt to contribute towards it!

Many Thanks