norlab-ulaval / libnabo

A fast K Nearest Neighbor library for low-dimensional spaces
http://norlab-ulaval.github.io/libnabo/
BSD 3-Clause "New" or "Revised" License
440 stars 144 forks source link

Linker errors #50

Closed shamitb closed 6 years ago

shamitb commented 8 years ago

I get linker errors while trying to use libnabo (inside a ros node) - when I compile (in Ubuntu) from catkin_ws the linker throws an error:

undefined reference to `Nabo::NearestNeighbourSearch<float, Eigen::Matrix<float, -1, -1, 0, -1, -1> >::createKDTreeLinearHeap(Eigen::Matrix<float, -1, -1, 0, -1, -1> const&, int, unsigned int, Nabo::Parameters const&)'

undefined reference to `Nabo::NearestNeighbourSearch<float, Eigen::Matrix<float, -1, -1, 0, -1, -1> >::knn(Eigen::Matrix<float, -1, 1, 0, -1, 1> const&, Eigen::Matrix<int, -1, 1, 0, -1, 1>&, Eigen::Matrix<float, -1, 1, 0, -1, 1>&, int, float, unsigned int, float) const' collect2: error: ld returned 1 exit status

I had built from source using the master branch ...

HannesSommer commented 8 years ago

Probably you are effectively linking to an outdated version of nabo.a or nabo.so. Could you please double check that you are not linking to a different version of libnabo? E.g. by running make VERBOSE=1 in the build/libnabo folder of your catkin_workspace and parsing the linker arguments for nabo? It should point into the appropriate devel space. If that is the case please try to resolve or report back. If that is the not the case try run make install in the build/libnabo folder and link (build) your client code again after that.

HannesSommer commented 6 years ago

Seems obsolete. Closing it.