c++ runtime library

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • mohi

    c++ runtime library

    hello every one ,
    this may be very basic question and may be a bit out of topic ,,

    can anyone please tell me what are the functions of runtime library
    and are they the one which create the program stack, manages heap???

    and how can i find out that does my compiler (or linker) produces
    dynamically linked runtime libraries (if so how can i make it to do it
    statically on gnu g++ on fedora c8)

    mohan
  • Victor Bazarov

    #2
    Re: c++ runtime library

    mohi wrote:
    hello every one ,
    this may be very basic question and may be a bit out of topic ,,
    >
    can anyone please tell me what are the functions of runtime library
    and are they the one which create the program stack, manages heap???
    The list is too long to put in a newsgroup posting. Please get a copy
    of the Standard (better both C and C++), you'll have all the information
    you need. Or get a copy of "The C++ Standard Library: A Tutorial And a
    Reference" by Nicolai Josuttis.
    and how can i find out that does my compiler (or linker) produces
    dynamically linked runtime libraries (if so how can i make it to do it
    statically on gnu g++ on fedora c8)
    Your compiler should have the documentation tell you about the ways to
    achieve what you need. In lieu of the documentation you could use a
    book or some other third-party document. Check the technical section in
    your nearest book store. Also, ask in one of the 'comp.os.linux. *'
    newsgroups.

    V
    --
    Please remove capital 'A's when replying by e-mail
    I do not respond to top-posted replies, please don't ask

    Comment

    • Paavo Helde

      #3
      Re: c++ runtime library

      mohi <mohangupta13@g mail.comkirjuta s:
      hello every one ,
      this may be very basic question and may be a bit out of topic ,,
      >
      can anyone please tell me what are the functions of runtime library
      and are they the one which create the program stack, manages heap???
      The "runtime library" usually refers to the C runtime library, which
      contains implementations of functions like fopen() and printf(). Stack
      management is typically mostly done by the compiler without any library
      help, except for some things like alloca(). OTOH, heap management is
      usually done by runtime library (malloc(), free(), etc.)

      For performing its tasks the runtime library often calls the underlying
      OS functions like open() or CreateFile(). One of the tasks of the runtime
      library is to provide a portable interface to C programs.

      For C++ programs there is also C++ runtime library (called STL usually),
      which contains implementations of things like std::ostream and
      std::vector. For performing its tasks, it may use the underlying C
      runtime library or call the OS functions directly.

      If you are working on Linux, then the man pages contain C runtime library
      functions in section 3 and OS calls in section 2. This number is
      displayed right after the function name in the man page header.
      Unfortunately, the man system usually does not contain any C++ library
      documentation.
      and how can i find out that does my compiler (or linker) produces
      dynamically linked runtime libraries (if so how can i make it to do it
      statically on gnu g++ on fedora c8)
      There is probably some linker switch, but why should you care? In any
      case, the runtime libraries are normally not produced by your compiler,
      they are preinstalled, possibly both the dynamic and static versions.

      hth
      Paavo

      Comment

      Working...