Static and dynamic library

Discussion in 'C++' started by meendar, Dec 26, 2005.

  1. meendar

    meendar Guest

    can anyone tell me what the static and dynamic library?

    thnkx in advance.
     
    meendar, Dec 26, 2005
    #1
    1. Advertising

  2. meendar

    W Marsh Guest

    meendar wrote:
    > can anyone tell me what the static and dynamic library?
    >
    > thnkx in advance.
    >


    This isn't really a C++ question and so isn't on-topic in this group,
    but it's Christmas.

    A static library is linked into the program itself. A dynamic library is
    external, and loaded by the program when needed.
     
    W Marsh, Dec 26, 2005
    #2
    1. Advertising

  3. meendar

    meendar Guest

    thanks for your help.
    but in an interview i was asked, how can we use static and dynamic
    library in c++?
     
    meendar, Dec 26, 2005
    #3
  4. meendar

    W Marsh Guest

    meendar wrote:
    > thanks for your help.
    > but in an interview i was asked, how can we use static and dynamic
    > library in c++?
    >


    It's an issue that occurs often when using C++ to create applications,
    but it's not an actual C++ language question. You may well be expected
    to know how use both static and dynamic libraries at work, but it's not
    relevant in this group.
     
    W Marsh, Dec 26, 2005
    #4
  5. meendar

    Jim Langston Guest

    "meendar" <> wrote in message
    news:...
    > thanks for your help.
    > but in an interview i was asked, how can we use static and dynamic
    > library in c++?


    Try microsoft.public.vc.language for this question (even if you don't use
    vc). They will be able to answer your Windows specific c++ questions.
     
    Jim Langston, Dec 26, 2005
    #5
  6. meendar

    Dave Guest

    meendar wrote:
    > thanks for your help.
    > but in an interview i was asked, how can we use static and dynamic
    > library in c++?
    >

    It would depend on the particular environment. I've built shared files
    on a Sun before, where you need to use a particular flag when compiling
    the object files, and another when linking them to make a library.

    The main advantage with static libraries is that if the executable
    program is is moved to another machine, it will not depend on the
    library being installed, there. However, it has disadvantages too - the
    program is bigger, takes up more memory if invoked several times and
    updates to the library will not be reflected in the executable.

    Overall, static libraries seem to be dying. Solaris 10 no longer ships
    with static libraries.

    You need to look at the particular documentation on your own C++
    compiler and linker.

    Sorry, must stop there, as otherwise I will get shot on what must be the
    most unfriendly newsgroup I have ever come across.

    --
    Dave K

    http://www.southminster-branch-line.org.uk/

    Please note my email address changes periodically to avoid spam.
    It is always of the form: month-year@domain. Hitting reply will work
    for a couple of months only. Later set it manually. The month is
    always written in 3 letters (e.g. Jan, not January etc)
     
    Dave, Dec 26, 2005
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    6
    Views:
    839
    red floyd
    May 10, 2005
  2. Replies:
    2
    Views:
    6,512
    Maett
    May 16, 2005
  3. iceColdFire

    Static library Vs. Dynamic library

    iceColdFire, May 17, 2005, in forum: C++
    Replies:
    3
    Views:
    17,055
  4. Even

    static library and dynamic library

    Even, Oct 18, 2007, in forum: C Programming
    Replies:
    6
    Views:
    649
    Mark McIntyre
    Oct 20, 2007
  5. DJ Stunks
    Replies:
    0
    Views:
    329
    DJ Stunks
    Feb 10, 2007
Loading...

Share This Page