Re: Does linux have libraries/dlls?

From: Daniel LaBell (nospam-d4l_at_earthlink.net)
Date: 04/13/04


Date: Mon, 12 Apr 2004 23:17:58 GMT

Stephen Kay <sk@karma-lab.com> writes:

> I'm looking at doing some linux development in C/C++, coming from a
> background of Mac and some Windows.
>
> I would assume Linux has the equivalent to static libraries (on Mac OS 9)
> and DLLs on Windows?
>
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.



Relevant Pages

  • Re: Do I need a Page File?
    ... paging out physical memory or not. ... Can I do that or does Windows XP really need the ... > require the paging file, ... > unlimited amounts of RAM, we wouldn't even NEED a paging file. ...
    (microsoft.public.windowsxp.general)
  • Re: maximum .net process can use
    ... As I said before a 32 bit windows app. ... probably need more than 2GB of RAM or you have to accept the possible paging ... |> |I used taskmanager that came with window to look at the memory usage ... |> No, it won't help you at all, unless you have a high paging rate. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: upgrading memory
    ... what is in memory has to be written on the disk and the new ... it will be because it reduces or eliminates paging ... manipulation of data that occurs in the CPU or in RAM. ... Microsoft MVP Windows - Shell/User ...
    (microsoft.public.windowsxp.basics)
  • Re: 1GB of RAM, isnt it enough?
    ... > space is needed than is available in RAM but the system will work. ... > virtual memory is not needed, ... the paging file, you'll increase paging to the other files, and cripple ... > allow windows to change itssize. ...
    (microsoft.public.windowsxp.general)
  • Re: How to have perl on a CD (windows)
    ... > memory stick and could run on any windows computer. ... Firstly, Tiny Perl is able to run Perl programs, say from a floppy, with ... pm files either under site/lib or lib. ... Checking the lib.zip file under Tiny Perl reveals that no hash modules have ...
    (comp.lang.perl.misc)