{"id":5352,"date":"2014-03-30T21:02:04","date_gmt":"2014-03-30T21:02:04","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/c-weird-shared-library-error-eclipse-collection-of-common-programming-errors\/"},"modified":"2014-03-30T21:02:04","modified_gmt":"2014-03-30T21:02:04","slug":"c-weird-shared-library-error-eclipse-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/c-weird-shared-library-error-eclipse-collection-of-common-programming-errors\/","title":{"rendered":"C++: Weird shared library error &#8211; eclipse-Collection of common programming errors"},"content":{"rendered":"<p>I had exactly the same error. I am using eclipse Juno with Cuda under Ubuntu 10.04. The problem was that while I wad already configured the linker path to point to <code>\/usr\/local\/cuda\/lib64<\/code> (in <code>~\/.bashrc<\/code> etc), eclipse still couldn&#8217;t find it. I could run the compiled (via eclipse) project from terminal, but it couldn&#8217;t link in eclipse&#8217;s terminal after trying to <code>Run<\/code>.<\/p>\n<p>My solution was to add the variable <code>LD_LIBRARY_PATH<\/code> with value <code>\/usr\/local\/cuda\/lib64<\/code> in <code>File-&gt;Properties-&gt;Run\/Debug Settings-&gt;Edit (Selected project)-&gt;Environment Tab<\/code><\/p>\n<p>I don&#8217;t know if there&#8217;s a more permanent solution but it worked for me. I should also mention that I had already added accordingly some extra variables in the Building Environment (<code>C\/C++ Build-&gt;Environment<\/code> in the properties window) because I couldn&#8217;t build the project for the same reason.<\/p>\n<p>The only weird thing is that at first it could run without problem and then when I reopened eclipse, this error appeared without me changing anything.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I had exactly the same error. I am using eclipse Juno with Cuda under Ubuntu 10.04. The problem was that while I wad already configured the linker path to point to \/usr\/local\/cuda\/lib64 (in ~\/.bashrc etc), eclipse still couldn&#8217;t find it. I could run the compiled (via eclipse) project from terminal, but it couldn&#8217;t link in [&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-5352","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/5352","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=5352"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/5352\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=5352"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=5352"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=5352"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}