delorie.com/djgpp/doc/libc/libc_1.html   search  
libc.a reference

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1. Introduction

The standard C library, `libc.a', is automatically linked into your programs by the `gcc' control program. It provides many of the functions that are normally associated with C programs. This document gives the proper usage information about each of the functions and variables found in `libc.a'.

For each function or variable that the library provides, the definition of that symbol will include information on which header files to include in your source to obtain prototypes and type definitions relevant to the use of that symbol.

Note that many of the functions in `libm.a' (the math library) are defined in `math.h' but are not present in libc.a. Some are, which may get confusing, but the rule of thumb is this--the C library contains those functions that ANSI dictates must exist, so that you don't need the -lm if you only use ANSI functions. In contrast, `libm.a' contains more functions and supports additional functionality such as the matherr call-back and compliance to several alternative standards of behavior in case of FP errors. See section libm, for more details.

Debugging support functions are in the library `libdbg.a'; link your program with `-ldbg' to use them.


  webmaster     delorie software   privacy  
  Copyright © 2004     Updated Apr 2004