LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   What exactly are shared libraries? (https://www.linuxquestions.org/questions/linux-newbie-8/what-exactly-are-shared-libraries-772151/)

Chenchu 11-28-2009 01:59 PM

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

MrCode 11-28-2009 02:10 PM

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 :o

Wikipedia link: Shared libraries.

knudfl 11-28-2009 03:40 PM

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
.....

paulsm4 11-28-2009 04:13 PM

One other point worth emphasizing:

Quote:

Windows .dll's have significant differences from *nix .so's

Chenchu 11-28-2009 06:29 PM

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.

?

paulsm4 11-28-2009 06:31 PM

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.

Chenchu 11-28-2009 07:14 PM

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


All times are GMT -5. The time now is 12:11 PM.