I would assume Linux has the equivalent to static libraries (on Mac OS 9)
and DLLs on Windows?
Thanks -
Stephen
... Linux/Unix has offers the ability to both
statically or dynamically link library routines
.
--
<< http://michaeljtobler.homelinux.com/ >>
Real computer scientists don't comment their code. The
identifiers are so long they can't afford the disk space.
Aravindh
Stephen Kay <s...@karma-lab.com> wrote in message news:<BCA03B2A.27F90%s...@karma-lab.com>...
Linux has .so files Pronounced: dot S-O
.a files Pronounced: dot a
.o files Pronounced: dot o
(and a few other types )
.so files: These are shared objects, not only are they dynamically resolved,
but if more than 1 process/program/application uses the same lib,
the kernel will set up memory mapping to share the same memory space of the
lib. You may need to read up on paging and virtual memory to get this. And
paging opposed to just swapping. We call it a swapfile, but its paging,
probably just to keep it simpler for computer operators back in late 1970's
when UNIX got paging, as in why change mkswap to mkpage? etc.
Anyway, you can list the .so's used by a program
with the command ldd. Try ldd /bin/bash.
.SO's are generally supperior to to dll's.
.a files: These are lib files, contain .o files.
.o files: These are either kernel modules, or the product of .C .CC .c++
etc.
I think the equivalent you want to is the .a files. If you using Make
lookup ar, and ranlib.
Producing .SO files is some work, and generally,
I'd say unless your project, is in fact a general purpose lib, you don't
need to produce them, but should ensure, that you don't muck up the
linking so much that you use all static. I'd say the typical, smallish
project will static link its on .o's and .a's and link in libc, etc.
dynamically and (typically) this will be default compiler behavior.
Static and dynamic libraries are antonyms! In Linux, dynamic libraries
are called "shared objects" and have the prefix or "midfix" .so, e.g.
libc.so.6 - statically linked libraries are usually called something.a
Are you seeking to develop a dynamically linked library? Or are you
merely curious about underlying operating system mechanisms?