Note that there are some explanatory texts on larger screens.

plurals
  1. POld linkage problems: /usr/bin/ld: cannot find [libraryname]
    primarykey
    data
    text
    <p>Im using Qmake to build a shared library on Ubuntu 9.10</p> <p>This shared library (A) has a dependency on another shared library (B).</p> <p>project B has been successfully built.</p> <p>in the .pro file for project A, my LIBS variable looks like this:</p> <pre><code>LIBS += -L../datelib/bin -llibdatelib_release.so.1.0.0 </code></pre> <p>(I used the full shlib name because the library versions are different.)</p> <p>In any case, when I attempt to build project A, it breaks at the linkage stage, and prints the error message:</p> <pre><code>/usr/bin/ld: cannot find -llibdatelib_release.so.1.0.0 collect2: ld returned 1 exit status make[1]: ***[bin/libprojecta_release.so.6.0.0] Error 1 make ***[release] Error 2 Exited with code 2 </code></pre> <p>From the error message, I thought ld was complaining that it could not locate the libdatelib file, so I manually copied it to /usr/lib/</p> <p>however, that did not solve the problem, and I am getting the same error message.</p> <p>Anyone knows how to fix this?</p> <p><strong>[Edit]</strong></p> <p>I'm quite new to building using gcc. I know how to create symbolic links, but which paths do I use for the lnk command?. The file I want to link to is in /home/username/work/cppdev/datelib/bin.</p> <p>Also the build system I use (qmake), automatically creates symbolic links as part of the build, so I already have the following files in my /home/username/work/cppdev/datelib/bin folder:</p> <ul> <li>libdatelib_release.so (sym link)</li> <li>libdatelib_release.so.1 (sym link)</li> <li>libdatelib_release.so.1.0 (sym link)</li> <li>libdatelib_release.so.1.0.0 (shared lib)</li> </ul> <p>I may have to ask another question to explain why there are so many symlinks (whats the point?), and why I cant just link directly to a shared lib, but have to go through a symbolic link. I've read some online docs, but what I've seen so far seems more like dictum/tradition rather than actual technical reasons WHY this level of abstraction is required when linking on Linux.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload