Showing LNK2019 error for UNavigationSystemV1::FindPathToActorSynchronously

Can anyone help with fixing this please?

Severity	Code	Description	Project	File	Line	Suppression State
Error	LNK2019	unresolved external symbol "__declspec(dllimport) public: static class UNavigationPath * __cdecl UNavigationSystemV1::FindPathToActorSynchronously(class UObject *,struct FVector const &,class AActor *,float,class AActor *,class TSubclassOf<class UNavigationQueryFilter>)" (__imp_?FindPathToActorSynchronously@UNavigationSystemV1@@SAPEAVUNavigationPath@@PEAVUObject@@AEBUFVector@@PEAVAActor@@M2V?$TSubclassOf@VUNavigationQueryFilter@@@@@Z) referenced in function "protected: struct FVector __cdecl ANewTrackerBot::GetNavigationPoints(void)" (?GetNavigationPoints@ANewTrackerBot@@IEAA?AUFVector@@XZ)	Game_1	D:\Projects\Unreal Projects\Game_1\Intermediate\ProjectFiles\NewTrackerBot.cpp.obj	1	

You need to add depencies to in *.Build.cs file of your modules to modules from which functions you using, if oyu don’t do that you will have linker errors. There will module depencies already there like "Engine, “Core” add depencies to this list

Look on top API reference of class that linker mentiones:

There information about module class belongs to “NavigationSystem” and it one that you need to add that to depencies

Did you modify Build.cs file? You need to add “NavigationSystem” at the end

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

1 Like