<OT> MS finally gets a little smarter
James McDonald
james
Mon May 17 11:53:17 PDT 2004
Kurt Wall wrote:
>Quoth James McDonald:
>
>
>>My question is:
>>
>>Lets say you had two versions of libmytestlib.so in /usr/lib and
>>/usr/local/lib how do you tell it to pick up one particular library over
>>another...
>>
>>
>
>Note that a properly-compiled library doesn't use libmytestlib.so.
>Rather, it uses explicit library versons, say, libmytestlib-1.2.so, and
>and allows the dynamic linker/loader (ld.so an GNU libc systems) to
>figure out the library version at run time.
>
>At compile time, you modify the library path fed to the compiler so that
>one gets found before the other. Compare
>
>$ gcc foo.c -L /usr/lib -L /usr/local/lib -lmytestlib
>
>to
>
>$ gcc foo.c -L /usr/local/lib -L /usr/lib -lmytestlib
>
>
>
>>I presume LD_LIBRARY_PATH is parsed left to right but what happens when
>>you want to explicitly assign individual libs ?
>>
>>
>
>You use LD_LIBRARY_PATH at run time.
>
>
>
>>Ohh and BTW barefeet and a hot cow pat can be heaven on a cold morning.
>>
>>
>
>Eew.
>
>Kurt
>
>
So as usual I discover the Linux system is inherently better than the
old windows system. Thanks kurt most informative...
--
James McDonald
(Would you like fries with that MCSE?)
Singleton Australia
61+ (0)2 65712401
61+ 0428 320 219
15:10:00 up 4 days, 17:34, 6 users, load average: 0.29, 0.20, 0.14
Linux 2.4.22 #1 Mon Sep 1 20:03:11 EST 2003 athlon i386 GNU/Linux
More information about the Linux-users
mailing list