🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.unix.programmer
Article #3346

ld.so, how do I include my own libraries?

#3346
From: Thomas Conner Annandale
Date: Wed, 02 Oct 2002 02:46
33 lines
2287 bytes
First off, I barely know what I'm talking about, so please bear with me.

I'm on a Linux box for which I do not have root privileges.  I have
created a program which uses shared library (?) files which are not in the
standard paths.  I compile my program with -lSDL_gfx, and I have a
directory with the files:

  libSDL_gfx.a 
  libSDL_gfx.so
  libSDL_gfx.so.0.0.0
  libSDL_gfx.la
  libSDL_gfx.so.0

When I try to run my program, I get this:

  ./ServerDriver: error while loading shared libraries: libSDL_gfx.so.0:  
  cannot open shared object file: No such file or directory

What do I do to make the executable aware of the directory where it can 
find the share library?  Remember, I don't have root access.  I read in 
the 'man ld.so' file that I can set the LD_LIBRARY_PATH environment 
variable to tell it where to find my libraries, so in bash I typed:

  LD_LIBRARY_PATH=/net/hu2/lonely/cs4455/SDL_gfx-2.0.3/local/lib

which is the full directory where the shared library files libSDL_gfx.* 
files are stored, but it still gives me the same error when I try to run 
my program.  What do I do?


-- 
Thomas
www.boredatheist.com
Technical Details
Message-ID: <andmmd$s5v$1@news-int.gatech.edu>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!cyclone.bc.net!snoopy.risq.qc.ca!newsflash.concordia.ca!pitt.edu!news-ext.gatech.edu!news-int.gatech.edu!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fc89c,7093db2131cc7021,start
X-Google-Attributes: gidfc89c,public
X-Google-Thread: 115a30,7093db2131cc7021,start
X-Google-Attributes: gid115a30,public
X-Google-ArrivalTime: 2002-10-01 19:50:16 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!cyclone.bc.net!snoopy.risq.qc.ca!newsflash.concordia.ca!pitt.edu!news-ext.gatech.edu!news-int.gatech.edu!not-for-mail
From: Thomas Conner Annandale <gte829m@prism.gatech.edu>
Newsgroups: comp.unix.programmer,git.unix.linux
Subject: ld.so, how do I include my own libraries?
Date: Wed, 2 Oct 2002 02:46:37 +0000 (UTC)
Organization: Georgia Institute of Technology
Lines: 33
Sender: Thomas Conner Annandale <gte829m@acmey.gatech.edu>
Message-ID: <andmmd$s5v$1@news-int.gatech.edu>
NNTP-Posting-Host: acmey.gatech.edu
X-Trace: news-int.gatech.edu 1033526797 28863 130.207.165.23 (2 Oct 2002 02:46:37 GMT)
X-Complaints-To: usenet@news-int.gatech.edu
NNTP-Posting-Date: Wed, 2 Oct 2002 02:46:37 +0000 (UTC)
User-Agent: tin/pre-1.4-19990624 ("Dawnrazor") (UNIX) (SunOS/5.7 (sun4u))