Does linux have libraries/dlls? - Help

This is a discussion on Does linux have libraries/dlls? - Help ; 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? Thanks - Stephen...

+ Reply to Thread
Results 1 to 6 of 6

Thread: Does linux have libraries/dlls?

  1. Does linux have libraries/dlls?

    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?

    Thanks -
    Stephen


  2. Re: Does linux have libraries/dlls?

    In comp.os.linux.questions Stephen Kay wrote:

    > 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?


    This has nothingto do with Linux, but rather with the manner in which
    youchoose to compile your programs. Examine the "-static" option in
    "man gcc".

    Static linking is a dumb idea for all but very specialized programs
    that may require it for some arcane reasons, many of which have to
    do with system administrative tasks in the event of disk partition
    failures and the like.

    tony


    --
    use hotmail for any email replies


    -----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
    http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
    -----== Over 100,000 Newsgroups - 19 Different Servers! =-----

  3. Re: Does linux have libraries/dlls?

    Stephen Kay wrote:

    > 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/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.


  4. Re: Does linux have libraries/dlls?

    You are right in assuming that.

    Aravindh

    Stephen Kay wrote in message news:...
    > 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?
    >
    > Thanks -
    > Stephen


  5. Re: Does linux have libraries/dlls?

    Stephen Kay 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.

  6. Re: Does linux have libraries/dlls?

    > I would assume Linux has the equivalent to static libraries (on Mac OS 9)
    > and DLLs on Windows?


    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?

+ Reply to Thread