OSDev.org

The Place to Start for Operating System Developers
It is currently Fri Apr 19, 2024 5:35 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Shared Library Paths: Linux
PostPosted: Sun Feb 02, 2003 3:40 am 
I'm going to be doing some programming using Java 2 for sure and maybe SDL. I'm using Linux (Red Hat 8.0, but I'm not married to the distro at all). One thing I've been having consistent trouble with in running test applications (other people's Java and SDL based games :D) is shared object files either missing or having trouble finding them.

Missing problem: For one SDL application, I get./nil: error while loading shared libraries: libSDL-1.0.so.0: cannot open shared object file: No such file or directory.

Indeed, this file is not resident on my computer. However, if I attempt to use the proper rpm, I get an error message telling me that a more current rpm is already installed.

Rpms are sometimes ****y about these dependencies, and I really don't want to have to remove a package to temporarily install a deprecated package. Switching back and forth is not a solution, but would compiling the older lib from source be viable or could I create a symbolic link named libSDL-1.0.so.0 pointing to a correct library? (Couldn't find appropriate material on libSDL.org)

Finding problem: In the second case, the library/shared object IS in the correct place, but the game can't find it. I'm searching through my Linux texts and help docs and haven't found anything that tells me how to properly troubleshoot this.

Thanks in advance if anyone is able to help.


Top
  
 
 Post subject: Re:Shared Library Paths: Linux
PostPosted: Sun Feb 02, 2003 7:17 am 
I discovered a solution. First, I had to make sure the file was actually in the directory in ld.so.conf

Next, I created a LD_LIBRARY_PATH variable in .bash_profile and set it to /usr/local/lib ... but I'm not sure if I actually need to do this.

Next, I ran ldconfig, and then I was able to use the shared library objects that were "missing"


Top
  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 116 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group