Hey,
I am trying to change the FindPath function in ARecastNavMesh. Everything works except I wrote a custom class that has dtNavMeshQuery as parent with a findCustomPath() function.
Visual studio compiles fine but when UE4 rebuilds the binaries it gives me these linker errors:
[2/3] Link UE4Editor-MyGame.dll
Creating library D:\Unreal\GAME\MyGame\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-MyGame.lib and object D:\Unreal\GAME\MyGame\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-MyGame.exp
Module.MyGame.cpp.obj : error LNK2019: unresolved external symbol "public: void __cdecl dtNodePool::clear(void)" (?clear@dtNodePool@@QEAAXXZ) referenced in function "public: unsigned int __cdecl dtNavMeshCustomQuery::findCustomPath(class UObject const *,unsigned __int64,unsigned __int64,float const *,float const *,class dtQueryFilter const *,struct dtQueryCustomResult &,float *)const " (?findCustomPath@dtNavMeshCustomQuery@@QEBAIPEBVUObject@@_K1PEBM2PEBVdtQueryFilter@@AEAUdtQueryCustomResult@@PEAM@Z)
Module.MyGame.cpp.obj : error LNK2019: unresolved external symbol "public: struct dtNode * __cdecl dtNodePool::getNode(unsigned __int64)" (?getNode@dtNodePool@@QEAAPEAUdtNode@@_K@Z) referenced in function "public: unsigned int __cdecl dtNavMeshCustomQuery::findCustomPath(class UObject const *,unsigned __int64,unsigned __int64,float const *,float const *,class dtQueryFilter const *,struct dtQueryCustomResult &,float *)const " (?findCustomPath@dtNavMeshCustomQuery@@QEBAIPEBVUObject@@_K1PEBM2PEBVdtQueryFilter@@AEAUdtQueryCustomResult@@PEAM@Z)
Module.MyGame.cpp.obj : error LNK2019: unresolved external symbol "public: __cdecl dtNodeQueue::dtNodeQueue(int)" (??0dtNodeQueue@@QEAA@H@Z) referenced in function "public: unsigned int __cdecl dtNavMeshCustomQuery::findCustomPath(class UObject const *,unsigned __int64,unsigned __int64,float const *,float const *,class dtQueryFilter const *,struct dtQueryCustomResult &,float *)const " (?findCustomPath@dtNavMeshCustomQuery@@QEBAIPEBVUObject@@_K1PEBM2PEBVdtQueryFilter@@AEAUdtQueryCustomResult@@PEAM@Z)
Module.MyGame.cpp.obj : error LNK2019: unresolved external symbol "public: __cdecl dtNodeQueue::~dtNodeQueue(void)" (??1dtNodeQueue@@QEAA@XZ) referenced in function "public: void * __cdecl dtNodeQueue::`scalar deleting destructor'(unsigned int)" (??_GdtNodeQueue@@QEAAPEAXI@Z)
Module.MyGame.cpp.obj : error LNK2019: unresolved external symbol "private: void __cdecl dtNodeQueue::bubbleUp(int,struct dtNode *)" (?bubbleUp@dtNodeQueue@@AEAAXHPEAUdtNode@@@Z) referenced in function "public: unsigned int __cdecl dtNavMeshCustomQuery::findCustomPath(class UObject const *,unsigned __int64,unsigned __int64,float const *,float const *,class dtQueryFilter const *,struct dtQueryCustomResult &,float *)const " (?findCustomPath@dtNavMeshCustomQuery@@QEBAIPEBVUObject@@_K1PEBM2PEBVdtQueryFilter@@AEAUdtQueryCustomResult@@PEAM@Z)
Module.MyGame.cpp.obj : error LNK2019: unresolved external symbol "private: void __cdecl dtNodeQueue::trickleDown(int,struct dtNode *)" (?trickleDown@dtNodeQueue@@AEAAXHPEAUdtNode@@@Z) referenced in function "public: unsigned int __cdecl dtNavMeshCustomQuery::findCustomPath(class UObject const *,unsigned __int64,unsigned __int64,float const *,float const *,class dtQueryFilter const *,struct dtQueryCustomResult &,float *)const " (?findCustomPath@dtNavMeshCustomQuery@@QEBAIPEBVUObject@@_K1PEBM2PEBVdtQueryFilter@@AEAUdtQueryCustomResult@@PEAM@Z)
Module.MyGame.cpp.obj : error LNK2001: unresolved external symbol "struct FThreadSafeStaticStat<struct FStat_STAT_Navigation_RecastPathfinding> StatPtr_STAT_Navigation_RecastPathfinding" (?StatPtr_STAT_Navigation_RecastPathfinding@@3U?$FThreadSafeStaticStat@UFStat_STAT_Navigation_RecastPathfinding@@@@A)
D:\Unreal\GAME\MyGame\Binaries\Win64\UE4Editor-MyGame.dll : fatal error LNK1120: 7 unresolved externals
It is mainly LNK2019… I did add “Navmesh” to my dependencies and included “DetourNode.h” where all the classes and structs are declared.
Does anyone have any idea how to solve these errors? I have been searching a while on my own now but cannot make sense of it.
Help greatly appreciated
Elias