Source code of C standard library...

This is a discussion on Source code of C standard library... within the C Programming forums, part of the General Programming Boards category; Hi, I viewed the header files for some libraries but there are only declarations. Is the source code stored somewhere ...

  1. #1
    Registered User Nutshell's Avatar
    Join Date
    Jan 2002
    Posts
    1,020

    Source code of C standard library...

    Hi,

    I viewed the header files for some libraries but there are only declarations. Is the source code stored somewhere else? How can i view them? For example, where s the source code for printf()?

    thnx a lot

  2. #2
    Registered User
    Join Date
    Nov 2001
    Posts
    65
    Sources are usually compiled into library files (.lib) in commercial compilers and distrubuted with their headers so you cannot read the source.

    However you may try yo search for an open source compiler such as gcc.
    The experimenter who does not know what he is looking for will not understand what he finds.
    - Claude Bernard

  3. #3
    Registered User
    Join Date
    Aug 2001
    Posts
    129
    For DJGPP (should work for any other compiler, but they might have done it differently in their original code...)

    ftp://gatekeeper.dec.com/pub/micro/p...2/djlsr203.zip (1.5M)
    kooma - t.h@iki.fi

  4. #4
    the Corvetter
    Join Date
    Sep 2001
    Posts
    1,584
    ozgulker has the right idea. When you write a library, you use multiple .c/.cpp files and a header file to link all of them, and then you compile and run lib.exe to make the library. Then you #include the .h file to use the functions. The lib is already compiled. So, I don't think that you'll be able to get at the code.
    1978 Silver Anniversary Corvette

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Need software to help to understand C source code
    By Kincider in forum C++ Programming
    Replies: 1
    Last Post: 09-28-2006, 09:44 PM
  2. Source code....
    By Darkcoder in forum Game Programming
    Replies: 8
    Last Post: 03-07-2005, 07:58 PM
  3. DxEngine source code
    By Sang-drax in forum Game Programming
    Replies: 5
    Last Post: 06-26-2003, 05:50 PM
  4. Lines from Unix's source code have been copied into the heart of Linux????
    By zahid in forum A Brief History of Cprogramming.com
    Replies: 13
    Last Post: 05-19-2003, 03:50 PM
  5. Source Code Needed!
    By spongleman in forum C++ Programming
    Replies: 1
    Last Post: 01-02-2002, 07:14 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21