What is the job of the compiler? What does the linker do? Describe the differences between a compile error and a link error.
What will be an ideal response?
The compiler reads the source code and checks it for syntax (grammar) errors and if all correct builds the object files (*.obj). The linker combines the object files with the included libraries and builds the executable file. A compiler error is a syntax error found in the source code. The linker error usually means that C++ can’t find something, such as a function or an included library.
Computer Science & Information Technology