Microsoft Visual C++ Windows Applications by Example
上QQ阅读APP看书,第一时间看更新

The Compiler and the Linker

The text of a program is called its source code. The compiler is the program that translates the source code into target code, and the linker puts several compiled files into an executable file.

Let us say we have a C++ program in the source code file Prog.cpp and a routine used by the program in Routine.cpp. Furthermore, the program calls a function in the standard library. In this case, the compiler translates the source code into object code and the linker joins the code into the executable file Prog.exe.

The Compiler and the Linker

If the compiler reports an error, we refer to it as compile-time error. In the same way, if an error occurs during the execution of the program, we call it a run-time error.