In article <11************ **********@o13g 2000cwo.googleg roups.com>,
<sa***********@ yahoo.com> wrote:
Confusing th eword with "library", "shared library" and how to use
these things in real C project, is there any small example I can take a
look. Thanks.
The C language itself does not have "library" or "shared library"
or "project". The C standard requires that the implementation provide
a standard set of routines which it calls "the standard library",
but the C standard puts no restriction on how the implementation
does that.
It is -common- for implementations to provide ways of bundling
groups of half-compiled programs, and that those bundles can
be referenced by the linking phase in order to provide access
to the routines and data, but there is a fair variability in
how that is done.
A "shared library" (in common parlance) is just another
library (with system-dependant semantics and invocation
mechanisms). Again the C standard has nothing to say on
the matter.
When a system bothers to distinguish between a "library"
and a "shared library", it might commonly be saying that
only one copy of the "shared library" will be placed in memory
for access by all users and all processes, whereas a library
on such a system that was -not- "shared" would have a copy of
some or all of it placed into each process's address space.
Details of what a "library" or "shared libary" mean on your
system, and how to use them, should be asked about in a newsgroup
appropriate for your system. As I mentioned before, they are not
C concepts as such, and there are important differences between
different systems.
--
Chocolate is "more than a food but less than a drug" -- RJ Huxtable