flann-lib / flann

Fast Library for Approximate Nearest Neighbors
http://people.cs.ubc.ca/~mariusm/flann
Other
2.25k stars 649 forks source link

FLANN Compilation issue - Unresolved external symbol #199

Open rainforest1 opened 10 years ago

rainforest1 commented 10 years ago

When i try to compile the mex_nearest_neighbors project in Visual studio 10, it throws the 45 unresolved external symbol errors. Please see below-

nearest_neighbors.obj : error LNK2019: unresolved external symbol _mxGetPr referenced in function "void cdecl matlabStructToFlannStruct(struct mxArray_tag const ,struct FLANNParameters &)" (?matlabStructToFlannStruct@@YAXPBUmxArray_tag@@AAUFLANNParameters@@@Z) nearest_neighbors.obj : error LNK2019: unresolved external symbol _mxGetField_700 referenced in function "void __cdecl matlabStructToFlannStruct(struct mxArray_tag const ,struct FLANNParameters &)" (?matlabStructToFlannStruct@@YAXPBUmxArray_tag@@AAUFLANNParameters@@@Z) nearest_neighbors.obj : error LNK2019: unresolved external symbol _mexErrMsgTxt referenced in function "void cdecl check_allowed_type(struct mxArray_tag const *)" (?check_allowed_type@@YAXPBUmxArray_tag@@@Z) nearest_neighbors.obj : error LNK2019: unresolved external symbol _mxIsInt32 referenced in function "void cdecl check_allowed_type(struct mxArray_tag const )" (?check_allowed_type@@YAXPBUmxArray_tag@@@Z) nearest_neighbors.obj : error LNK2019: unresolved external symbol _mxIsUint8 referenced in function "void __cdecl check_allowed_type(struct mxArray_tag const )" (?check_allowed_type@@YAXPBUmxArray_tag@@@Z) nearest_neighbors.obj : error LNK2019: unresolved external symbol _mxIsDouble referenced in function "void cdecl check_allowed_type(struct mxArray_tag const *)" (?check_allowed_type@@YAXPBUmxArray_tag@@@Z) nearest_neighbors.obj : error LNK2019: unresolved external symbol _mxIsSingle referenced in function "void cdecl check_allowed_type(struct mxArray_tag const *)" (?check_allowed_type@@YAXPBUmxArray_tag@@@Z) nearest_neighbors.obj : error LNK2019: unresolved external symbol _mxCreateDoubleMatrix_700 referenced in function "void cdecl _find_nn(int,struct mxArray_tag * * const,int,struct mxArray_tag const * * const)" (?_find_nn@@YAXHQAPAUmxArray_tag@@HQAPBU1@@Z) nearest_neighbors.obj : error LNK2019: unresolved external symbol _flann_find_nearest_neighbors_int referenced in function "void cdecl _find_nn(int,struct mxArray_tag * * const,int,struct mxArray_tag const * * const)" (?_find_nn@@YAXHQAPAUmxArray_tag@@HQAPBU1@@Z) nearest_neighbors.obj : error LNK2019: unresolved external symbol _flann_find_nearest_neighbors_byte referenced in function "void __cdecl _find_nn(int,struct mxArray_tag * * const,int,struct mxArray_tag const * * const)" (?_find_nn@@YAXHQAPAUmxArray_tag@@HQAPBU1@@Z) nearest_neighbors.obj : error LNK2019: unresolved external symbol _flann_find_nearest_neighbors_double referenced in function "void cdecl _find_nn(int,struct mxArray_tag * * const,int,struct mxArray_tag const * * const)" (?_find_nn@@YAXHQAPAUmxArray_tag@@HQAPBU1@@Z) nearest_neighbors.obj : error LNK2019: unresolved external symbol _flann_find_nearest_neighbors_float referenced in function "void cdecl _find_nn(int,struct mxArray_tag * * const,int,struct mxArray_tag const * * const)" (?_find_nn@@YAXHQAPAUmxArray_tag@@HQAPBU1@@Z) nearest_neighbors.obj : error LNK2019: unresolved external symbol _mxGetData referenced in function "void __cdecl _find_nn(int,struct mxArray_tag * * const,int,struct mxArray_tag const * * const)" (?_find_nn@@YAXHQAPAUmxArray_tag@@HQAPBU1@@Z) nearest_neighbors.obj : error LNK2019: unresolved external symbol _mxIsStruct referenced in function "void cdecl _find_nn(int,struct mxArray_tag * * const,int,struct mxArray_tag const * * const)" (?_find_nn@@YAXHQAPAUmxArray_tag@@HQAPBU1@@Z) nearest_neighbors.obj : error LNK2019: unresolved external symbol _mxIsNumeric referenced in function "void cdecl _find_nn(int,struct mxArray_tag * * const,int,struct mxArray_tag const * * const)" (?_find_nn@@YAXHQAPAUmxArray_tag@@HQAPBU1@@Z) nearest_neighbors.obj : error LNK2019: unresolved external symbol _mxGetM referenced in function "void __cdecl _find_nn(int,struct mxArray_tag * * const,int,struct mxArray_tag const * * const)" (?_find_nn@@YAXHQAPAUmxArray_tag@@HQAPBU1@@Z) nearest_neighbors.obj : error LNK2019: unresolved external symbol _mxGetN referenced in function "void cdecl _find_nn(int,struct mxArray_tag * * const,int,struct mxArray_tag const * * const)" (?_find_nn@@YAXHQAPAUmxArray_tag@@HQAPBU1@@Z) nearest_neighbors.obj : error LNK2019: unresolved external symbol _flann_find_nearest_neighbors_index_int referenced in function "void cdecl _index_find_nn(int,struct mxArray_tag * * const,int,struct mxArray_tag const * * const)" (?_index_find_nn@@YAXHQAPAUmxArray_tag@@HQAPBU1@@Z) nearest_neighbors.obj : error LNK2019: unresolved external symbol _flann_find_nearest_neighbors_index_byte referenced in function "void cdecl _index_find_nn(int,struct mxArray_tag * * const,int,struct mxArray_tag const * * const)" (?_index_find_nn@@YAXHQAPAUmxArray_tag@@HQAPBU1@@Z) nearest_neighbors.obj : error LNK2019: unresolved external symbol _flann_find_nearest_neighbors_index_double referenced in function "void cdecl _index_find_nn(int,struct mxArray_tag * * const,int,struct mxArray_tag const * * const)" (?_index_find_nn@@YAXHQAPAUmxArray_tag@@HQAPBU1@@Z) nearest_neighbors.obj : error LNK2019: unresolved external symbol _flann_find_nearest_neighbors_index_float referenced in function "void cdecl _index_find_nn(int,struct mxArray_tag * * const,int,struct mxArray_tag const * * const)" (?_index_find_nn@@YAXHQAPAUmxArray_tag@@HQAPBU1@@Z) nearest_neighbors.obj : error LNK2019: unresolved external symbol _flann_free_index_int referenced in function "void cdecl _free_index(int,struct mxArray_tag * * const,int,struct mxArray_tag const * * const)" (?_free_index@@YAXHQAPAUmxArray_tag@@HQAPBU1@@Z) nearest_neighbors.obj : error LNK2019: unresolved external symbol _flann_free_index_byte referenced in function "void cdecl _free_index(int,struct mxArray_tag * * const,int,struct mxArray_tag const * * const)" (?_free_index@@YAXHQAPAUmxArray_tag@@HQAPBU1@@Z) nearest_neighbors.obj : error LNK2019: unresolved external symbol _flann_free_index_double referenced in function "void cdecl _free_index(int,struct mxArray_tag * * const,int,struct mxArray_tag const * * const)" (?_free_index@@YAXHQAPAUmxArray_tag@@HQAPBU1@@Z) nearest_neighbors.obj : error LNK2019: unresolved external symbol _flann_free_index_float referenced in function "void cdecl _free_index(int,struct mxArray_tag * * const,int,struct mxArray_tag const * * const)" (?_free_index@@YAXHQAPAUmxArray_tag@@HQAPBU1@@Z) nearest_neighbors.obj : error LNK2019: unresolved external symbol _flann_log_verbosity referenced in function "void cdecl _set_log_level(int,struct mxArray_tag * * const,int,struct mxArray_tag const * * const)" (?_set_log_level@@YAXHQAPAUmxArray_tag@@HQAPBU1@@Z) nearest_neighbors.obj : error LNK2019: unresolved external symbol _flann_set_distance_type referenced in function "void cdecl _set_distance_type(int,struct mxArray_tag * * const,int,struct mxArray_tag const * * const)" (?_set_distance_type@@YAXHQAPAUmxArray_tag@@HQAPBU1@@Z) nearest_neighbors.obj : error LNK2019: unresolved external symbol _flann_save_index_int referenced in function "void cdecl _save_index(int,struct mxArray_tag * * const,int,struct mxArray_tag const * * const)" (?_save_index@@YAXHQAPAUmxArray_tag@@HQAPBU1@@Z) nearest_neighbors.obj : error LNK2019: unresolved external symbol _flann_save_index_byte referenced in function "void cdecl _save_index(int,struct mxArray_tag * * const,int,struct mxArray_tag const * * const)" (?_save_index@@YAXHQAPAUmxArray_tag@@HQAPBU1@@Z) nearest_neighbors.obj : error LNK2019: unresolved external symbol _flann_save_index_double referenced in function "void cdecl _save_index(int,struct mxArray_tag * * const,int,struct mxArray_tag const * * const)" (?_save_index@@YAXHQAPAUmxArray_tag@@HQAPBU1@@Z) nearest_neighbors.obj : error LNK2019: unresolved external symbol _flann_save_index_float referenced in function "void cdecl _save_index(int,struct mxArray_tag * * const,int,struct mxArray_tag const * * const)" (?_save_index@@YAXHQAPAUmxArray_tag@@HQAPBU1@@Z) nearest_neighbors.obj : error LNK2019: unresolved external symbol _mxGetString_700 referenced in function "void cdecl _save_index(int,struct mxArray_tag * * const,int,struct mxArray_tag const * * const)" (?_save_index@@YAXHQAPAUmxArray_tag@@HQAPBU1@@Z) nearest_neighbors.obj : error LNK2019: unresolved external symbol _mxIsChar referenced in function "void cdecl _save_index(int,struct mxArray_tag * * const,int,struct mxArray_tag const * * const)" (?_save_index@@YAXHQAPAUmxArray_tag@@HQAPBU1@@Z) nearest_neighbors.obj : error LNK2019: unresolved external symbol _mxCreateNumericMatrix_700 referenced in function "void cdecl _load_index(int,struct mxArray_tag * * const,int,struct mxArray_tag const * * const)" (?_load_index@@YAXHQAPAUmxArray_tag@@HQAPBU1@@Z) nearest_neighbors.obj : error LNK2019: unresolved external symbol _flann_load_index_int referenced in function "void cdecl _load_index(int,struct mxArray_tag * * const,int,struct mxArray_tag const * * const)" (?_load_index@@YAXHQAPAUmxArray_tag@@HQAPBU1@@Z) nearest_neighbors.obj : error LNK2019: unresolved external symbol _flann_load_index_byte referenced in function "void cdecl _load_index(int,struct mxArray_tag * * const,int,struct mxArray_tag const * * const)" (?_load_index@@YAXHQAPAUmxArray_tag@@HQAPBU1@@Z) nearest_neighbors.obj : error LNK2019: unresolved external symbol _flann_load_index_double referenced in function "void cdecl _load_index(int,struct mxArray_tag * * const,int,struct mxArray_tag const * * const)" (?_load_index@@YAXHQAPAUmxArray_tag@@HQAPBU1@@Z) nearest_neighbors.obj : error LNK2019: unresolved external symbol _flann_load_index_float referenced in function "void cdecl _load_index(int,struct mxArray_tag * * const,int,struct mxArray_tag const * * const)" (?_load_index@@YAXHQAPAUmxArray_tag@@HQAPBU1@@Z) nearest_neighbors.obj : error LNK2019: unresolved external symbol _mxSetField_700 referenced in function "struct mxArray_tag * cdecl flannStructToMatlabStruct(struct FLANNParameters const &)" (?flannStructToMatlabStruct@@YAPAUmxArray_tag@@ABUFLANNParameters@@@Z) nearest_neighbors.obj : error LNK2019: unresolved external symbol _mxCreateStructMatrix_700 referenced in function "struct mxArray_tag * cdecl flannStructToMatlabStruct(struct FLANNParameters const &)" (?flannStructToMatlabStruct@@YAPAUmxArray_tag@@ABUFLANNParameters@@@Z) nearest_neighbors.obj : error LNK2019: unresolved external symbol _flann_build_index_int referenced in function "void cdecl _build_index(int,struct mxArray_tag * * const,int,struct mxArray_tag const * * const)" (?_build_index@@YAXHQAPAUmxArray_tag@@HQAPBU1@@Z) nearest_neighbors.obj : error LNK2019: unresolved external symbol _flann_build_index_byte referenced in function "void cdecl _build_index(int,struct mxArray_tag * * const,int,struct mxArray_tag const * * const)" (?_build_index@@YAXHQAPAUmxArray_tag@@HQAPBU1@@Z) nearest_neighbors.obj : error LNK2019: unresolved external symbol _flann_build_index_double referenced in function "void cdecl _build_index(int,struct mxArray_tag * * const,int,struct mxArray_tag const * * const)" (?_build_index@@YAXHQAPAUmxArray_tag@@HQAPBU1@@Z) nearest_neighbors.obj : error LNK2019: unresolved external symbol _flann_build_index_float referenced in function "void __cdecl _build_index(int,struct mxArray_tag * * const,int,struct mxArray_tag const * * const)" (?_build_index@@YAXHQAPAUmxArray_tag@@HQAPBU1@@Z) LIBCMT.lib(crt0.obj) : error LNK2019: unresolved external symbol _main referenced in function ___tmainCRTStartup nearest_neighbors.exe : fatal error LNK1120: 45 unresolved externals

C:\PROGRA~1\MATLAB\R2010A\BIN\MEX.PL : error : Compile of 'F:\DIVYANG\DVD\FINAL_~1\FLANN-~1.1-S\SRC\MATLAB\nearest_neighbors.cpp' failed.

Build FAILED.

Please help.

zhangzhensong commented 8 years ago

Hi, I have face the same problem. Have you solved it?