Compilation and Compilers
Terminology
- Compilation - translating code from one language to another
- Compiler - software that translates code automatically
- High-Level Language - programming language focused on ease for humans
- Machine Code - language of the CPU, Architecture specific
Compilers
Its typical for a compiler to translate into intermediate steps,
most commonly Assembly Code
Assembly is directly comparable to machine code

3 Steps to Build

- Preprocessing - Any macros (#include) are replaced with their definitions, and any included files (typically header files) are copy/pasted into the source files. The resulting C++ files are known as 'compilation units'.
- Compilation - Each compilation unit is independently compiled to a so-called 'object file' (nothing to do with objects) containing machine code.
- Linking - Declarations are linked to their definitions across the object files, and an 'executable file' is produced. There must be exactly one 'main()' function defined among the linked object files, which is used as the entry point for the program.