Path: utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!aplcen!samsung!think!mintaka!bloom-beacon!EXPO.LCS.MIT.EDU!rws From: rws@EXPO.LCS.MIT.EDU (Bob Scheifler) Newsgroups: comp.windows.x Subject: Re: Can some explain shared libs? Message-ID: <9001081700.AA00895@expire.lcs.mit.edu> Date: 8 Jan 90 17:00:49 GMT References: <1990Jan6.050638.1097@agate.berkeley.edu> Sender: daemon@athena.mit.edu (Mr Background) Organization: The Internet Lines: 25 There is nothing I've found in the X documentation that really explains the difference. There is nothing about X that is particularly special wrt shared libraries. Is there any difference in run-time memeory use (RAM) by programs that use shared libraries? Yes, if you run different clients using a given shared library, they will share the library text and data. If you link the library statically into each client, the code and data gets replicated. The tradeoff depends on how much of the library each client uses (one copy of the entire library, vs. several pieces of the library). In general, for the X libraries, I suspect the shared form is better. Can I, as an application programmer, use these libraries, Of course. and is there any difference in the linking syntax, or for that matter the code I must write? No. There are differences in how dependencies are specified, but if you use Imakefiles, everything is taken care of for you.