🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.sun
Article #6428

LD search order...mistake in man pages?

#6428
From: Thomas Wolf
Date: Thu, 10 Jan 1991 18:26
17 lines
1339 bytes
I recently tried building a program that used X11R3.  Because I kept the
X11R3 libraries in a "non-standard" place, I invoked 'ld' with the '-L'
option.  However, I also have the LD_LIBRARY_PATH variable set (to
'/usr/lib:$OPENWINHOME/lib').  Instead of resolving references using the
-L provided directory, the linker appears to garner the references from my
/usr/lib libraries (which is where I keep my X11R4 libraries), because
when I do an 'ldd' on the executable, shared libraries in that directory
are given.

Contrary to what the man pages for 'ld' state, the LD_LIBRARY_PATH
directories appear to be searched BEFORE -L specified dirs.  Am I missing
some subtle point, or are the man pages wrong?

Thanks for any info.

| Thomas Wolf   | (201) 615-4789  
| Bell Labs, NJ | wolf@mink.att.com
Technical Details
Message-ID: <1171@brchh104.bnr.ca>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!cunews!bnrgate!brtph3!brchh104!brchs1!bnr.ca!rice.edu!sun-spots-request

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!cunews!bnrgate!brtph3!brchh104!brchs1!bnr.ca!rice.edu!sun-spots-request
From: wolf@mink.att.com (Thomas Wolf)
Newsgroups: comp.sys.sun
Subject: LD search order...mistake in man pages?
Keywords: Miscellaneous
Message-ID: <1171@brchh104.bnr.ca>
Date: 10 Jan 91 18:26:52 GMT
Sender: news@brchh104.bnr.ca
Organization: Sun-Spots
Lines: 17
Approved: Sun-Spots@rice.edu
X-Sun-Spots-Digest: Volume 10, Issue 14, message 10
X-Note: Submissions: sun-spots@rice.edu, Admin: sun-spots-request@rice.edu