Compile-time errors occur while compiling a single translation unit—syntax mistakes, type errors, undeclared names—and reference a file and line. Link-time errors occur when combining object files—unresolved/duplicate symbols—and reference symbol names, not source lines. Recognizing which stage failed guides the fix (code vs build/link configuration).
Real-world example
A typo is a compile error at a line; a missing library is a link error naming an unresolved symbol.
Compilation & Linking
Preprocessor & Macros
Compilation & Linking