flann-lib / flann

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

undefined reference #464

Closed Aishwarya6104 closed 4 years ago

Aishwarya6104 commented 4 years ago

Dear Mariusmuja,

I'm trying to use FLANN Library in my project, but I got this error while compiling in MATLAB:

/tmp/mex_7044973879583848_26897/nearest_neighbors.o: In Function _save_index(int, mxArray_tag**, int, mxArray_tag const**)': nearest_neighbors.cpp:(.text+0x258): Undefined reference toflann_save_index_int' nearest_neighbors.cpp:(.text+0x278): Undefined reference to flann_save_index_float' nearest_neighbors.cpp:(.text+0x288): Undefined reference toflann_save_index_double' nearest_neighbors.cpp:(.text+0x298): Undefined reference to flann_save_index_byte' /tmp/mex_7044973879583848_26897/nearest_neighbors.o: In Function_free_index(int, mxArray_tag, int, mxArray_tag const)': nearest_neighbors.cpp:(.text+0x2fe): Undefined reference to flann_free_index_int' nearest_neighbors.cpp:(.text+0x336): Undefined reference toflann_free_index_float' nearest_neighbors.cpp:(.text+0x346): Undefined reference to flann_free_index_double' nearest_neighbors.cpp:(.text+0x356): Undefined reference toflann_free_index_byte' /tmp/mex_7044973879583848_26897/nearest_neighbors.o: In Function _index_find_nn(int, mxArray_tag**, int, mxArray_tag const**)': nearest_neighbors.cpp:(.text+0x7f4): Undefined reference toflann_find_nearest_neighbors_index_float' nearest_neighbors.cpp:(.text+0x9a0): Undefined reference to auf flann_find_nearest_neighbors_index_double' nearest_neighbors.cpp:(.text+0xa48): Undefined reference to aufflann_find_nearest_neighbors_index_byte' nearest_neighbors.cpp:(.text+0xabc): Undefined reference to auf flann_find_nearest_neighbors_index_int' /tmp/mex_7044973879583848_26897/nearest_neighbors.o: In Function_find_nn(int, mxArray_tag, int, mxArray_tag const)': nearest_neighbors.cpp:(.text+0xc86): Undefined reference to flann_find_nearest_neighbors_float' nearest_neighbors.cpp:(.text+0xe0e): Undefined reference toflann_find_nearest_neighbors_double' nearest_neighbors.cpp:(.text+0xe89): Undefined reference to flann_find_nearest_neighbors_byte' nearest_neighbors.cpp:(.text+0xf6c): Undefined reference toflann_find_nearest_neighbors_int' /tmp/mex_7044973879583848_26897/nearest_neighbors.o: In Function _load_index(int, mxArray_tag**, int, mxArray_tag const**)': nearest_neighbors.cpp:(.text+0x131e): Undefined reference toflann_load_index_int' nearest_neighbors.cpp:(.text+0x1350): Undefined reference to flann_load_index_double' nearest_neighbors.cpp:(.text+0x13b8): Undefined reference toflann_load_index_float' nearest_neighbors.cpp:(.text+0x1400): Undefined reference to flann_load_index_byte' /tmp/mex_7044973879583848_26897/nearest_neighbors.o: In Function_build_index(int, mxArray_tag, int, mxArray_tag const)': nearest_neighbors.cpp:(.text+0x14fc): Undefined reference to flann_build_index_float' nearest_neighbors.cpp:(.text+0x193b): Undefined reference toflann_build_index_double' nearest_neighbors.cpp:(.text+0x1983): Undefined reference toflann_build_index_byte' nearest_neighbors.cpp:(.text+0x19e7): Undefined reference toflann_build_index_int' /tmp/mex_7044973879583848_26897/nearest_neighbors.o: In Function _set_distance_type(int, mxArray_tag**, int, mxArray_tag const**)': nearest_neighbors.cpp:(.text+0x66): Undefined reference toflann_set_distance_type' /tmp/mex_7044973879583848_26897/nearest_neighbors.o: In Function _set_log_level(int, mxArray_tag**, int, mxArray_tag const**)': nearest_neighbors.cpp:(.text+0x12d): Undefined reference toflann_log_verbosity' collect2: Error: ld returned 1 as the End Status

Please help me to solve this issue. Thanks in Advance !