1 |
>> How does a program in Gentoo know, where to look for shared libraries? |
2 |
> |
3 |
> Try running "ldconfig -p", which relates to Nikos's comment about |
4 |
> ld.so.conf. |
5 |
> |
6 |
As you both indicated me in into that direction I played with libtool. |
7 |
During usage it gives a comprehensive answer to our question: |
8 |
|
9 |
<quote libtool> |
10 |
If you ever happen to want to link against installed libraries |
11 |
in a given directory, LIBDIR, you must either use libtool, and |
12 |
specify the full pathname of the library, or use the `-LLIBDIR' |
13 |
flag during linking and do at least one of the following: |
14 |
- add LIBDIR to the `LD_LIBRARY_PATH' environment variable |
15 |
during execution |
16 |
- add LIBDIR to the `LD_RUN_PATH' environment variable |
17 |
during linking |
18 |
- use the `-Wl,-rpath -Wl,LIBDIR' linker flag |
19 |
- have your system administrator add LIBDIR to `/etc/ld.so.conf' |
20 |
|
21 |
See any operating system documentation about shared libraries for |
22 |
more information, such as the ld(1) and ld.so(8) manual pages. |
23 |
</quote> |
24 |
|
25 |
Al |