Re: Does linux have libraries/dlls?
From: Daniel LaBell (nospam-d4l_at_earthlink.net)
Date: 04/13/04
- Next message: Lewin A.R.W. Edwards: "Re: Does linux have libraries/dlls?"
- Previous message: Aravindh K: "Re: Does linux have libraries/dlls?"
- In reply to: Stephen Kay: "Does linux have libraries/dlls?"
- Next in thread: Lewin A.R.W. Edwards: "Re: Does linux have libraries/dlls?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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.
- Next message: Lewin A.R.W. Edwards: "Re: Does linux have libraries/dlls?"
- Previous message: Aravindh K: "Re: Does linux have libraries/dlls?"
- In reply to: Stephen Kay: "Does linux have libraries/dlls?"
- Next in thread: Lewin A.R.W. Edwards: "Re: Does linux have libraries/dlls?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|