Linking is the final stage of the build process (often).
All the compiler does is compile individual C/C++ files to produce object files. After compilation you have as many object files as you had C/C++ source files.
You then feed all those objects to the linker along with any libraries you want to use, the standard library for instance, and any 3rd party object files you might have been supplied with and the linker pulls them all together into a single executable (assuming no errors).
One of the main jobs of the linkers is to resolve all the external symbols for each object file. A symbol is normally either a variable or a function and external one is one that you have declared as existing in another file at compilation time. It is the linker that produces unresolved external or multiple defined symbol errors.
In summary the compiler compiles a single source file into a single object file (but does it multiple times once for each source in the project)). The linker links multiple object files into a single executable.
Comment