Compilation Process in C

Compilation Process in C


Because the main objective is that computer execute the instructions written, by the developers, in the C files, it is necessary a compiler that converts these files (source language) to an executable files that could be runned by the machine (target language). This is why C language is considered a compiled language.

There are some compilers available for C, like Turbo C/C++, Borland C/++ and so on, but the most popular is GCC.

What is GCC?

GCC stands for GNU Compiler Collection. It is an integrated distribution of compilers, written in C language and developed by GNU Project, that supports a lot of programming languages: C, C++, Objective-C, Fortran, Go and more.

It is common to relate a name of a compiler with each programming language supported, for example: G++ for C++, GNAT for Ada, and GCC for C, which is understood as “GNU C Compiler”. All this compilers aim to generate a machine code directly to be read and executed by a processor (e.g., a logic chip).

The compilation process carried out by GCC Compiler consists in four steps: