Compilation and Linking
Updated on by Jeff Caldwell,
Writing C++ programs involves a multi-step process.
The compiler goes through each source (.cpp) file in your program and:
- Checks the code for errors.
- Translates the source code into machine language, called an object file.
Once the compiler is finished, the linker takes over and:
- Combines all of the generated object files into a single executable
- Links external libraries like the C++ Standard Library