Compilation Process

Created Thursday 05 May 2016

.cpp -> Pre-processor -> .cpp -> Compiler -> .s ->Assembler -> .o -> Linker -> .exe

  1. Pre-processor copy-pastes all the stuff from header files into one file, as well as processes the macros.

  1. Compiler converts everything to assembly code.

  1. Assembler turns that assembly code into object files.

  1. The linker links those object files and creates an exe file.

Compiler errors are not linker errors.

One way linker errors may result is when you declare something but do not define it; Declarations are a promise to the linker that the object or function will be defined at some point in the future.



Backlinks: index:CS225 Notes:Topics