LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-28-2009, 05:36 AM   #1
thatbloke
LQ Newbie
 
Registered: May 2004
Distribution: Fedora Core 1
Posts: 21

Rep: Reputation: 15
How to change the filename of a library dependency?


Hello, thought some more knowledgeable linux types might know this...

I am trying to compile a shared library. I can build and use the library perfectly fine. However, I have a problem with it that I would like to try and reslove.

The particular library in question is the SDL_image package. This (understandably) has a dependency on the main SDL library. I untar the source and then do the usual congifure/make/make install process to create the library, which I include and load dynamically (through dlopen()) in my program.

The issue I have is with the filename that it is created to use for the SDL library. When I run ldd, my libSDL_image.so file has a dependency on "libSDL-1.2.so.0". So that I do not have to create extra softlinks to that, I would prefer that it used the filename "libSDL.so" for this dependency.

Is there a way that I can create the library file such that is has a dependency on "libSDL.so" rather than the longer-winded name?

Would (or should?) this be a configure option, maybe a makefile option, something to do with ldconfig?

Is this possible?

Apologies if this is too specific for this forum or its in the wrong area, but maybe you can help anyway
 
Old 01-29-2009, 02:29 PM   #2
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
Hi -

Well, one option is to get the source for "libSDL_image", edit the makefile, and change the relevant "-L" entries to "-LSDL".

When I first saw the title to your post, I was going to suggest soft links. Frankly, I still think it's probably your best bet.

Also: you can add a "mklinks" target to your makefile to automate the "grunge" of refreshing your "ln -s" soft links, if you wish.

Just a thought .. PSM
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Change name of backup file in ext3 from filename~ to .filename~ Libu Linux - General 2 07-21-2008 09:29 PM
Library dependency cybernike Linux - Software 2 05-17-2008 03:56 PM
Convert static library (Filename.a) to dynamic shared object (filename.so) afx2029 Linux - Software 4 08-17-2007 06:07 AM
extracting a library file named filename.1.2.... Tavassoli Linux - Software 1 06-15-2006 07:29 AM
change uploaded files from filename.avi to filename.avi.html like www.rapidshare.de latheesan Linux - Newbie 3 06-16-2005 04:33 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:16 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration