fcl
fcl copied to clipboard
Linker errors with gjk_libccd.obj in fcl.lib
When I try to do collision checking using the example given in the README, as soon as I add the collision function, I get 7 unresolved externals.
Error LNK2019 unresolved external symbol _ccdVec3PointSegmentDist2 referenced in function "float __cdecl fcl::details::libccd_extension::ccdGJKDist2(void const *,void const *,struct _ccd_t const *,struct _ccd_vec3_t *,struct _ccd_vec3_t *)" (?ccdGJKDist2@libccd_extension@details@fcl@@YAMPBX0PBU_ccd_t@@PAU_ccd_vec3_t@@2@Z) D:\dev\Visual Studio 2015\Projects\fcl-collision\fcl-collision\fcl.lib(gjk_libccd.obj) 1
Error LNK2019 unresolved external symbol _ccdVec3PointTriDist2 referenced in function "float __cdecl fcl::details::libccd_extension::simplexReduceToTriangle(struct _ccd_simplex_t *,float,struct _ccd_vec3_t *)" (?simplexReduceToTriangle@libccd_extension@details@fcl@@YAMPAU_ccd_simplex_t@@MPAU_ccd_vec3_t@@@Z) D:\dev\Visual Studio 2015\Projects\fcl-collision\fcl-collision\fcl.lib(gjk_libccd.obj) 1
Error LNK2019 unresolved external symbol _ccdFirstDirDefault referenced in function "bool __cdecl fcl::details::GJKCollide(void *,void (__cdecl*)(void const *,struct _ccd_vec3_t const *,struct _ccd_vec3_t *),void (__cdecl*)(void const *,struct _ccd_vec3_t *),void *,void (__cdecl*)(void const *,struct _ccd_vec3_t const *,struct _ccd_vec3_t *),void (__cdecl*)(void const *,struct _ccd_vec3_t *),unsigned int,double,class fcl::Vec3fX<struct fcl::details::Vec3Data<double> > *,double *,class fcl::Vec3fX<struct fcl::details::Vec3Data<double> > *)" (?GJKCollide@details@fcl@@YA_NPAXP6AXPBXPBU_ccd_vec3_t@@PAU3@@ZP6AX13@Z045INPAV?$Vec3fX@U?$Vec3Data@N@details@fcl@@@2@PAN6@Z) D:\dev\Visual Studio 2015\Projects\fcl-collision\fcl-collision\fcl.lib(gjk_libccd.obj) 1
Error LNK2019 unresolved external symbol _ccdMPRIntersect referenced in function "bool __cdecl fcl::details::GJKCollide(void *,void (__cdecl*)(void const *,struct _ccd_vec3_t const *,struct _ccd_vec3_t *),void (__cdecl*)(void const *,struct _ccd_vec3_t *),void *,void (__cdecl*)(void const *,struct _ccd_vec3_t const *,struct _ccd_vec3_t *),void (__cdecl*)(void const *,struct _ccd_vec3_t *),unsigned int,double,class fcl::Vec3fX<struct fcl::details::Vec3Data<double> > *,double *,class fcl::Vec3fX<struct fcl::details::Vec3Data<double> > *)" (?GJKCollide@details@fcl@@YA_NPAXP6AXPBXPBU_ccd_vec3_t@@PAU3@@ZP6AX13@Z045INPAV?$Vec3fX@U?$Vec3Data@N@details@fcl@@@2@PAN6@Z) D:\dev\Visual Studio 2015\Projects\fcl-collision\fcl-collision\fcl.lib(gjk_libccd.obj) 1
Error LNK2019 unresolved external symbol _ccdMPRPenetration referenced in function "bool __cdecl fcl::details::GJKCollide(void *,void (__cdecl*)(void const *,struct _ccd_vec3_t const *,struct _ccd_vec3_t *),void (__cdecl*)(void const *,struct _ccd_vec3_t *),void *,void (__cdecl*)(void const *,struct _ccd_vec3_t const *,struct _ccd_vec3_t *),void (__cdecl*)(void const *,struct _ccd_vec3_t *),unsigned int,double,class fcl::Vec3fX<struct fcl::details::Vec3Data<double> > *,double *,class fcl::Vec3fX<struct fcl::details::Vec3Data<double> > *)" (?GJKCollide@details@fcl@@YA_NPAXP6AXPBXPBU_ccd_vec3_t@@PAU3@@ZP6AX13@Z045INPAV?$Vec3fX@U?$Vec3Data@N@details@fcl@@@2@PAN6@Z) D:\dev\Visual Studio 2015\Projects\fcl-collision\fcl-collision\fcl.lib(gjk_libccd.obj) 1
Error LNK2019 unresolved external symbol ___ccdSupport referenced in function "int __cdecl fcl::details::libccd_extension::__ccdGJK(void const *,void const *,struct _ccd_t const *,struct _ccd_simplex_t *)" (?__ccdGJK@libccd_extension@details@fcl@@YAHPBX0PBU_ccd_t@@PAU_ccd_simplex_t@@@Z) D:\dev\Visual Studio 2015\Projects\fcl-collision\fcl-collision\fcl.lib(gjk_libccd.obj) 1
Error LNK2001 unresolved external symbol _ccd_vec3_origin Testing D:\dev\Visual Studio 2015\Projects\fcl-collision\fcl-collision\fcl.lib(gjk_libccd.obj) 1
I think it may have something to do with the way I built the dependencies (all of them are cloned from their respective Github repos) and FCL but I'm not sure where I may have gone wrong. The dependencies I'm using are libccd, and octomap.
- For each dependency, I use the CMake GUI, choose the root folder to be where the source code is (ie. D:/dev/fcl-dependencies/libccd) and I choose a designated folder inside the root to where the built binaries will go (ie. D:/dev/fcl-dependencies/libccd/build). I configure and generate the binaries using the Visual Studio 14 2015 generator.
- I open Visual Studio 2015 as administrator, open the solution generated by CMake, build ALL_BUILD as Debug, then build ALL_BUILD as Release, and finally build INSTALL as Release.
- Then for FCL, I also use the CMake GUI, the folders used are similar to the dependencies (ie. D:/dev/fcl/fcl-master for source and D:/dev/fcl/fcl-master/build for binaries). FCL binaries are also configured and generated using the VIsual Studio 14 2015 generator.
-
- Using the same instance of Visual Studio, I open the solution generated by CMake, build ALL_BUILD as Release, then build ALL_BUILD as Debug, and finally build INSTALL as Debug. I do this because since FCL only generates 1 lib file as opposed to 2 (where 1 is for debug configurations and another one for release configurations).
- I have also tried building it the same way as the dependencies where I build ALL_BUILD as Debug, then build ALL_BUILD as Release, and finally build INSTALL as Release, but I still get linker errors.
I would really love some help with my issue.
It seems libccd is not linked correctly. Did you add libccd library files to your final solution?
What do you mean by add it to the final solution?
have the same problem?can anyone tell me what is wrong?
Hi guys, I'm having the same issue here. Found any solution?