Reputation: 5352
This maybe really stupid, but I faced the following error, while trying to compile certain code modules, using cmake
acg_localizer_active_search.cc:(.text+0x43c6): undefined reference to
`ANNkd_tree::ANNkd_tree(float**, int, int, int, ANNsplitRule)'
acg_localizer_active_search.cc:(.text+0x4441): undefined reference to
`ANNkd_tree::ANNkd_tree(float**, int, int, int, ANNsplitRule)'
I have been stuck for quite some time, solving error after error and have ended up here. Please help me. Thanks in advance
Sorry for not adding the code. it is around 2000 lines and am not sure where to locate this error. its part of a software package, called acg_localizer.
Upvotes: 0
Views: 185
Reputation: 14169
That's a link time error. The method ANNkd_tree::ANNkd_tree(float**, int, int, int, ANNsplitRule)
cannot be found in any libraries and object files specified in the link command, although it is referenced.
You have to find out where it is defined, and make sure the library it is defined in comes after the library that uses it on the linker command line.
You can use the nm
tool to find out which symbols (= variables, methods) are defined or used by an object file or library. Do a man nm
(or search on google) to find out more.
Upvotes: 1