LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-28-2009, 01:59 PM   #1
Chenchu
Member
 
Registered: Nov 2009
Location: Mars
Distribution: CentOS
Posts: 50

Rep: Reputation: 20
What exactly are shared libraries?


I've looked around to find some information on the net about the subject, but I couldn't find reasonable explanation of what are shared libraries?

I mean, I know the general concept of them but I would like to get some information about how they work, why are the used?..
I just want to get this concept settle better in my mind

thanks in advance fellas
 
Old 11-28-2009, 02:10 PM   #2
MrCode
Member
 
Registered: Aug 2009
Location: Oregon, USA
Distribution: Arch
Posts: 864
Blog Entries: 31

Rep: Reputation: 148Reputation: 148
EDIT: Sorry, plz ignore (I've left the link up, though). I was being too generic before, and you're asking for specifics...I'm not really that savvy myself

Wikipedia link: Shared libraries.

Last edited by MrCode; 11-28-2009 at 02:14 PM.
 
Old 11-28-2009, 03:40 PM   #3
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,514

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
No harm starting with the generic, others may fill
out what's missing. .. .. Some other "generic" info here :
http://www.yolinux.com/TUTORIALS/Lib...ndDynamic.html

http://tldp.org/HOWTO/Program-Librar...libraries.html

http://www.ibm.com/developerworks/li...ies/index.html
.....
And this one is very general http://www.google.com/linux

http://www.google.com/linux?hl=en&q=...es&btnG=Search
.....

Last edited by knudfl; 11-28-2009 at 07:57 PM.
 
Old 11-28-2009, 04:13 PM   #4
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
One other point worth emphasizing:

Quote:
Windows .dll's have significant differences from *nix .so's
 
Old 11-28-2009, 06:29 PM   #5
Chenchu
Member
 
Registered: Nov 2009
Location: Mars
Distribution: CentOS
Posts: 50

Original Poster
Rep: Reputation: 20
thanks for all your replies,
so just to see if I got it correct;

a shared library is actually a code [in some form] that a program needs to run properly. now instead of compiling that file into the executable file,
it is located on the disk and shared between all the programs that need it. when the program is executed, it calls the lib file it need and loads it.

?
 
Old 11-28-2009, 06:31 PM   #6
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
Yup - exactly

There are many advantages to using shared libraries; there are also a number of disadvantages.

In general - especially for "system level" components that are likely to be generally useful, and also likely to evolve over time, "shared libraries" tend to be the way to go.

Last edited by paulsm4; 11-28-2009 at 06:33 PM.
 
Old 11-28-2009, 07:14 PM   #7
Chenchu
Member
 
Registered: Nov 2009
Location: Mars
Distribution: CentOS
Posts: 50

Original Poster
Rep: Reputation: 20
ok, thank you.

I also found this link very useful for listing the advandages and disadv of shared lib:

http://www.sunmanagers.org/archives/1995/1602.html
 
1 members found this post helpful.
  


Reply



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
error while loading shared libraries: libhid.so.0: cannot open shared object file: No misungs Linux - Software 4 06-10-2009 12:05 PM
Urgent !!! rpm: error while loading shared libraries: libelf.so.1: cannot open shared tinaa Linux - Software 5 12-02-2008 03:19 PM
error while loading shared libraries: libstdc++.so.5: cannot open shared object file PaulyWally Debian 2 10-18-2008 05:59 PM
error while loading shared libraries: libgvc.so.3: cannot open shared object file coolrock Slackware 6 01-17-2007 05:10 PM
error while loading shared libraries: libdb-4.1.so: cannot open shared object file putquery8581 Linux - Software 1 10-01-2004 07:03 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:48 AM.

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