6.13. Installing GCC

6.13.1. Installation of GCC

After you unpacked the gcc-2.95.2 archive don't enter the newly created gcc-2.95.2 directory but stay in the /usr/src directory. Install GCC by running the following commands:


mkdir /usr/src/gcc-build &&
cd /usr/src/gcc-build &&
../gcc-2.95.2/configure --prefix=/usr \
   --with-gxx-include-dir=/usr/include/g++ \
   --enable-shared --enable-languages=c,c++ &&
make bootstrap &&
make install

6.13.2. Contents

The GCC package contains compilers, preprocessors and the GNU C++ Library.

6.13.3. Description

6.13.3.1. Compiler

A compiler translates source code in text format to a format that a computer understands. After a source code file is compiled into an object file, a linker will create an executable file from one or more of these compiler generated object files.

6.13.3.2. Pre-processor

A pre-processor pre-processes a source file, such as including the contents of header files into the source file. You generally don't do this yourself to save yourself a lot of time. You just insert a line like #include <filename>. The pre-processor file insert the contents of that file into the source file. That's one of the things a pre-processor does.

6.13.3.3. C++ Library

The C++ library is used by C++ programs. The C++ library contains functions that are frequently used in C++ programs. This way the programmer doesn't have to write certain functions (such as writing a string of text to the screen) from scratch every time he creates a program.