Compilation and Linking

Updated on by ,

Writing C++ programs involves a multi-step process.

Compiling

The compiler goes through each source (.cpp) file in your program and:

  1. Checks the code for errors.
  2. Translates the source code into machine language, called an object file.

Linking

Once the compiler is finished, the linker takes over and:

  1. Combines all of the generated object files into a single executable
  2. Links external libraries like the C++ Standard Library

WebMentions

No mentions yet

Say something about this post!