Im using Qmake to build a shared library on Ubuntu 9.10
This shared library (A) has a dependency on another shared library (B).
project B has been successfully built.
in the .pro file for project A, my LIBS variable looks like this:
LIBS += -L../datelib/bin -llibdatelib_release.so.1.0.0
(I used the full shlib name because the library versions are different.)
In any case, when I attempt to build project A, it breaks at the linkage stage, and prints the error message:
/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
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/
however, that did not solve the problem, and I am getting the same error message.
Anyone knows how to fix this?
[Edit]
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.
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:
- libdatelib_release.so (sym link)
- libdatelib_release.so.1 (sym link)
- libdatelib_release.so.1.0 (sym link)
- libdatelib_release.so.1.0.0 (shared lib)
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.