14.3. Stages of Compilation

Compiling a program involves many tools, GCC takes care of this by calling other programs to handle each stage of the process. The three main stages are preprocessing, compilation and linking. In C code, lines that begin with the hash symbol ``#'' are commands for the preprocessor, GCC includes a preprocessor called CPP (C Preprocessor). #define and #include are by far the most common preprocessor commands The compilation process is broken down into many smaller stages. One of these stages is confusingly called compilation. Compilation is the process of converting source code to object code. If you invoke GCC with ``-c'' it will When programs become large it can take time to compile them, by splitting a program into smaller files you can re-compile only the files that you have changed. First you must tell gcc to only compile the source files. This