Saturday, October 13, 2012

Difference Between Build and Compilation in C/C++


Build is the process to compile and link only the source files that have changed since the last build (i.e. based on file creation date and time).

Rebuild is the process to compile and link all source files regardless of whether they changed or not. Build is the normal thing to do and is faster. Sometimes the versions of project target components can get out of sync and rebuild is necessary to make the build successful.

Compilation is compiles the source file currently being edited.

The compilation of code involves several steps:

  • Parsing of the statements for syntax (language based)
  • Translation of the statements into machine language
  • Setting up the addresses of all variables
  • Optimization of the code (if desired)

No comments:

Post a Comment