{"id":1004,"date":"2022-08-30T15:10:47","date_gmt":"2022-08-30T15:10:47","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2013\/11\/09\/not-able-to-locate-error-cpp-linux-collection-of-common-programming-errors\/"},"modified":"2022-08-30T15:10:47","modified_gmt":"2022-08-30T15:10:47","slug":"not-able-to-locate-error-cpp-linux-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2022\/08\/30\/not-able-to-locate-error-cpp-linux-collection-of-common-programming-errors\/","title":{"rendered":"Not able to locate error cpp linux-Collection of common programming errors"},"content":{"rendered":"<p>This maybe really stupid, but I faced the following error, while trying to compile certain code modules, using cmake<\/p>\n<pre><code>    acg_localizer_active_search.cc:(.text+0x43c6): undefined reference to            \n    `ANNkd_tree::ANNkd_tree(float**, int, int, int, ANNsplitRule)'\n    acg_localizer_active_search.cc:(.text+0x4441): undefined reference to    \n   `ANNkd_tree::ANNkd_tree(float**, int, int, int, ANNsplitRule)'\n<\/code><\/pre>\n<ol>\n<li>Please help me to understand what this undefined reference error means.<\/li>\n<li>The error line mentioned as &#8216;.text+0x&#8230;&#8217;, is not understandable. How can I locate the error.<\/li>\n<\/ol>\n<p>I have been stuck for quite some time, solving error after error and have ended up here. Please help me. Thanks in advance<\/p>\n<p>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.<\/p>\n<ol>\n<li>\n<p>That&#8217;s a link time error. The method <code>ANNkd_tree::ANNkd_tree(float**, int, int, int, ANNsplitRule)<\/code> cannot be found in any libraries and object files specified in the link command, although it is referenced.<\/p>\n<p>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.<\/p>\n<p>You can use the <code>nm<\/code> tool to find out which symbols (= variables, methods) are defined or used by an object file or library. Do a <code>man nm<\/code> (or search on google) to find out more.<\/p>\n<\/li>\n<\/ol>\n<p id=\"rop\"><small>Originally posted 2013-11-09 23:12:32. <\/small><\/p>","protected":false},"excerpt":{"rendered":"<p>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)&#8217; acg_localizer_active_search.cc:(.text+0x4441): undefined reference to `ANNkd_tree::ANNkd_tree(float**, int, int, int, ANNsplitRule)&#8217; Please help me to understand what this undefined reference error means. The error line mentioned as &#8216;.text+0x&#8230;&#8217;, is [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1004","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/1004","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=1004"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/1004\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=1004"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=1004"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=1004"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}