Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C++项目无法编译,求助 #1

Open
ChrisPei opened this issue Jan 18, 2020 · 0 comments
Open

C++项目无法编译,求助 #1

ChrisPei opened this issue Jan 18, 2020 · 0 comments

Comments

@ChrisPei
Copy link

RecastDemo已经可以正常编译了。但是到NavigatorForUnity无法编译。
如下:

Navigator.cpp
NavigatorForUnity.cpp
Generating Code...
dllmain.cpp
Creating library C:\Users\Chris\Documents\Worktable\github\Navigator\recastnavigation\RecastDemo\Build\vs2015\Debug\NavigatorForUnity.lib and object C:\Users\Chris\Documents\Worktable\github\Navigator\recastnavigation\RecastDemo\Build\vs2015\Debug\NavigatorForUnity.exp
Navigator.obj : error LNK2019: unresolved external symbol "struct rcPolyMesh * __cdecl rcAllocPolyMesh(void)" (?rcAllocPolyMesh@@YAPAUrcPolyMesh@@xz) referenced in function "public: static int __cdecl Navigator::ConvertJsonToNavBinFile(char const *,char const *)" (?ConvertJsonToNavBinFile@Navigator@@SAHPBD0@Z)
Navigator.obj : error LNK2019: unresolved external symbol "void * __cdecl dtAlloc(unsigned int,enum dtAllocHint)" (?dtAlloc@@YAPAXIW4dtAllocHint@@@z) referenced in function "public: static class dtNavMesh * __cdecl Navigator::LoadNavMesh(char const *)" (?LoadNavMesh@Navigator@@SAPAVdtNavMesh@@pbd@Z)
Navigator.obj : error LNK2019: unresolved external symbol "void __cdecl dtFree(void *)" (?dtFree@@YAXPAX@Z) referenced in function "public: static int __cdecl Navigator::ConvertJsonToNavBinFile(char const *,char const *)" (?ConvertJsonToNavBinFile@Navigator@@SAHPBD0@Z)
Navigator.obj : error LNK2019: unresolved external symbol "public: unsigned int __thiscall dtNavMesh::init(struct dtNavMeshParams const *)" (?init@dtNavMesh@@QAEIPBUdtNavMeshParams@@@z) referenced in function "public: static class dtNavMesh * __cdecl Navigator::LoadNavMesh(char const *)" (?LoadNavMesh@Navigator@@SAPAVdtNavMesh@@pbd@Z)
Navigator.obj : error LNK2019: unresolved external symbol "public: unsigned int __thiscall dtNavMesh::init(unsigned char *,int,int)" (?init@dtNavMesh@@QAEIPAEHH@Z) referenced in function "public: static int __cdecl Navigator::ConvertJsonToNavBinFile(char const *,char const *)" (?ConvertJsonToNavBinFile@Navigator@@SAHPBD0@Z)
Navigator.obj : error LNK2019: unresolved external symbol "public: struct dtNavMeshParams const * __thiscall dtNavMesh::getParams(void)const " (?getParams@dtNavMesh@@QBEPBUdtNavMeshParams@@xz) referenced in function "public: static void __cdecl Navigator::SaveNavMesh(char const *,class dtNavMesh const *)" (?SaveNavMesh@Navigator@@SAXPBDPBVdtNavMesh@@@z)
Navigator.obj : error LNK2019: unresolved external symbol "public: unsigned int __thiscall dtNavMesh::addTile(unsigned char *,int,int,unsigned int,unsigned int *)" (?addTile@dtNavMesh@@QAEIPAEHHIPAI@Z) referenced in function "public: static class dtNavMesh * __cdecl Navigator::LoadNavMesh(char const *)" (?LoadNavMesh@Navigator@@SAPAVdtNavMesh@@pbd@Z)
Navigator.obj : error LNK2019: unresolved external symbol "public: unsigned int __thiscall dtNavMesh::getTileRef(struct dtMeshTile const *)const " (?getTileRef@dtNavMesh@@QBEIPBUdtMeshTile@@@z) referenced in function "public: static void __cdecl Navigator::SaveNavMesh(char const *,class dtNavMesh const *)" (?SaveNavMesh@Navigator@@SAXPBDPBVdtNavMesh@@@z)
Navigator.obj : error LNK2019: unresolved external symbol "public: int __thiscall dtNavMesh::getMaxTiles(void)const " (?getMaxTiles@dtNavMesh@@QBEHXZ) referenced in function "public: static void __cdecl Navigator::SaveNavMesh(char const *,class dtNavMesh const *)" (?SaveNavMesh@Navigator@@SAXPBDPBVdtNavMesh@@@z)
Navigator.obj : error LNK2019: unresolved external symbol "public: struct dtMeshTile const * __thiscall dtNavMesh::getTile(int)const " (?getTile@dtNavMesh@@QBEPBUdtMeshTile@@h@Z) referenced in function "public: static void __cdecl Navigator::SaveNavMesh(char const *,class dtNavMesh const *)" (?SaveNavMesh@Navigator@@SAXPBDPBVdtNavMesh@@@z)
Navigator.obj : error LNK2019: unresolved external symbol "class dtNavMesh * __cdecl dtAllocNavMesh(void)" (?dtAllocNavMesh@@YAPAVdtNavMesh@@xz) referenced in function "public: static int __cdecl Navigator::ConvertJsonToNavBinFile(char const *,char const *)" (?ConvertJsonToNavBinFile@Navigator@@SAHPBD0@Z)
Navigator.obj : error LNK2019: unresolved external symbol "void __cdecl dtFreeNavMesh(class dtNavMesh *)" (?dtFreeNavMesh@@YAXPAVdtNavMesh@@@z) referenced in function "public: virtual __thiscall Navigator::~Navigator(void)" (??1Navigator@@UAE@XZ)
Navigator.obj : error LNK2019: unresolved external symbol "public: __thiscall dtQueryFilter::dtQueryFilter(void)" (??0dtQueryFilter@@QAE@XZ) referenced in function "public: int __thiscall Navigator::findRandomPointAroundCircle(float *,float,float *)" (?findRandomPointAroundCircle@Navigator@@QAEHPAMM0@Z)
Navigator.obj : error LNK2019: unresolved external symbol "public: unsigned int __thiscall dtNavMeshQuery::init(class dtNavMesh const *,int)" (?init@dtNavMeshQuery@@QAEIPBVdtNavMesh@@h@Z) referenced in function "public: int __thiscall Navigator::init(char const *)" (?init@Navigator@@QAEHPBD@Z)
Navigator.obj : error LNK2019: unresolved external symbol "public: unsigned int __thiscall dtNavMeshQuery::findNearestPoly(float const *,float const *,class dtQueryFilter const *,unsigned int *,float *)const " (?findNearestPoly@dtNavMeshQuery@@QBEIPBM0PBVdtQueryFilter@@PAIPAM@Z) referenced in function "public: int __thiscall Navigator::findRandomPointAroundCircle(float *,float,float *)" (?findRandomPointAroundCircle@Navigator@@QAEHPAMM0@Z)
Navigator.obj : error LNK2019: unresolved external symbol "public: unsigned int __thiscall dtNavMeshQuery::findRandomPointAroundCircle(unsigned int,float const *,float,class dtQueryFilter const ,float (__cdecl)(void),unsigned int *,float *)const " (?findRandomPointAroundCircle@dtNavMeshQuery@@QBEIIPBMMPBVdtQueryFilter@@P6AMXZPAIPAM@Z) referenced in function "public: int __thiscall Navigator::findRandomPointAroundCircle(float *,float,float *)" (?findRandomPointAroundCircle@Navigator@@QAEHPAMM0@Z)
Navigator.obj : error LNK2019: unresolved external symbol "class dtNavMeshQuery * __cdecl dtAllocNavMeshQuery(void)" (?dtAllocNavMeshQuery@@YAPAVdtNavMeshQuery@@xz) referenced in function "public: int __thiscall Navigator::init(char const *)" (?init@Navigator@@QAEHPBD@Z)
Navigator.obj : error LNK2019: unresolved external symbol "void __cdecl dtFreeNavMeshQuery(class dtNavMeshQuery *)" (?dtFreeNavMeshQuery@@YAXPAVdtNavMeshQuery@@@z) referenced in function "public: virtual __thiscall Navigator::~Navigator(void)" (??1Navigator@@UAE@XZ)
Navigator.obj : error LNK2019: unresolved external symbol "bool __cdecl dtCreateNavMeshData(struct dtNavMeshCreateParams *,unsigned char * *,int *)" (?dtCreateNavMeshData@@YA_NPAUdtNavMeshCreateParams@@PAPAEPAH@Z) referenced in function "public: static int __cdecl Navigator::ConvertJsonToNavBinFile(char const *,char const *)" (?ConvertJsonToNavBinFile@Navigator@@SAHPBD0@Z)
C:\Users\Chris\Documents\Worktable\github\Navigator\recastnavigation\RecastDemo\Build\vs2015\Debug\NavigatorForUnity.dll : fatal error LNK1120: 19 unresolved externals

不是太懂c++,真心求助。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant