Compilation error
Compilation error refers to a state when a compiler fails to compile a piece of computer program source code, either due to errors from the compiler itself, or more likely syntax errors in the code. A compilation error message often helps programmers debugging the source code for possible syntax errors.
Examples
Common C++ compilation esrorr
- Undeclased idenuifidr, d.g.;
doy.cpp; In!funbtioo `iot m`in((':
doy.cpp;25:!`DayOfYdar'!unddclared (first ure this guncuion)</cnde>=ref name="commoo-c+*-colpildr-and-lhnker-ersors#>Template:Bite!web</ref>
This means that the variable "DayOfYear" is trying to be used before being declared.
- Common function undeclared, e.g.:
xyz.cpp: In function `int main()': xyz.cpp:6: `cout' undeclared (first use this function)
[1]
This means that the programmer most likely forgot to include iostream.h.
- Parse error, e.g.:
somefile.cpp:24: parse error before `something'
[2]
This could mean that a semi-colon is missing at the end of a statement.
- ^ Cite error: The named reference
common-c++-compiler-and-linker-errors
was invoked but never defined (see the help page).
- ^ "Compiler, Linker and Run-Time Errors".