Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

LIBPATH vs LD_LIBRARY_PATH

1,008 views
Skip to first unread message

Craig Hapanovich

unread,
Dec 6, 1999, 3:00:00 AM12/6/99
to
What is the difference between the LIBPATH and LD_LIBRARY_PATH
variables?

Craig Hapanovich
City of Milwaukee


Greg Wimpey

unread,
Dec 7, 1999, 3:00:00 AM12/7/99
to Craig Hapanovich
Craig Hapanovich <cha...@execpc.com> writes:

> What is the difference between the LIBPATH and LD_LIBRARY_PATH
> variables?
>

It's easy:

Some O/S's use the LD_LIBRARY_PATH environment variable to define a
list of directories to search for shared libraries. AIX does not use
this variable. Instead, it uses LIBPATH, which serves the same
function that LD_LIBRARY_PATH uses on other systems.

Hope this helps.

--
Greg Wimpey
greg.wimpey@waii*removetomail*.com.invalid

Gary R. Hook

unread,
Dec 8, 1999, 3:00:00 AM12/8/99
to
Greg Wimpey wrote:
>
> Craig Hapanovich <cha...@execpc.com> writes:
>
> > What is the difference between the LIBPATH and LD_LIBRARY_PATH
> > variables?
>
> It's easy:
>
> Some O/S's use the LD_LIBRARY_PATH environment variable to define a
> list of directories to search for shared libraries. AIX does not use
> this variable. Instead, it uses LIBPATH, which serves the same
> function that LD_LIBRARY_PATH uses on other systems.

If LIBPATH is set when you run the ld command (under the compiler or
by itself) it will be used instead of the default libs. Using the -L
option will cause LIBPATH to be ignored at link time.

Recommendation: don't just set LIBPATH and ignore it. Use it as
required for running programs (but not the linker).

--
Gary R. Hook / AIX Kernel Development, IBM / These opinions are _MINE_
________________________________________________________________________
A piece of canvas is only the beginning
It takes on character with every loving stroke
This thing of beauty is the passion of an artist's heart
By God's design, we are a skin kaleidoscope "Colored people", dc Talk

Christopher Sura

unread,
Dec 13, 1999, 3:00:00 AM12/13/99
to
In article <384E9CF6...@austinSPAM.ibm.com>,

ho...@austin.ibm.com wrote:
> If LIBPATH is set when you run the ld command (under the compiler or
> by itself) it will be used instead of the default libs. Using the -L
> option will cause LIBPATH to be ignored at link time.
>
> Recommendation: don't just set LIBPATH and ignore it. Use it as
> required for running programs (but not the linker).
>
I've always wondered: Is there a way to examine an executable file to
determine whether it set LIBPATH and what the value is?


Sent via Deja.com http://www.deja.com/
Before you buy.

Jens-Uwe Mager

unread,
Dec 14, 1999, 3:00:00 AM12/14/99
to
On Mon, 13 Dec 1999 15:58:42 GMT, Christopher Sura <cbs...@my-deja.com> wrote:

>I've always wondered: Is there a way to examine an executable file to
>determine whether it set LIBPATH and what the value is?

Use dump -n.

--
Jens-Uwe Mager <pgp-mailto:62CFDB25>

0 new messages