SimpleMoveToLocation Don't compiles

Tried to recreate TopDown Example. It uses “SimpleMoveToLocation” in player controller, but in my project it causes erros while compiling (if i comment that specific string error goes off).
UE4 compiler gives this two errors:

  1. PC_Main.cpp.obj : error LNK2019: ??? ?? ??? ??? ??? “__declspec(dllimport) public: static void __cdecl UAIBlueprintHelperLibrary::SimpleMoveToLocation(class AController *,struct FVector const &)” (_imp?SimpleMoveToLocation@UAIBlueprintHelperLibrary@@SAXPEAVAController@@AEBUFVector@@@Z) ? ??? “protected: void __cdecl APC_Main::SetNewMoveDestination(struct FVector)” (?SetNewMoveDestination@APC_Main@@IEAAXUFVector@@@Z)
  2. E:\UE_PR\G_TDRPG\Binaries\Win64\UE4Editor-G_TDRPG-5129.dll : fatal error LNK1120: ??? ??? ???: 1

(dll number changes some times (5129,0597,9569,7679))

Export File of my player controller looks like this:

#include "..\Public\PC_Main.h"
#include "Blueprint/AIBlueprintHelperLibrary.h"
#include "Runtime/Engine/Classes/Components/DecalComponent.h"
#include "HeadMountedDisplayFunctionLibrary.h"
#include "..\Public\C_Main.h"
#include "Engine/World.h"
1 Like

Typically link errors are due to missing module dependencies.

Try adding “AIModule” as a dependency to your module’s build.cs script.

2 Likes

Thank you very much, it worked. I added everything what was in example project and it compiled normaly.

If someone will face similar problem here is the screen of file where u must add modules. Higglited is what i added for my project tto compile normaly (G_TDRPG is name of my project and u must find file where ur prroject’s name will be in place of that)

2 Likes

thank you, good for me