Compilation error

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 syntax errors in the code. A compilation error message often helps programmers debugging the source code for possible syntax errors.

Contents

Examples

Common C++ compilation errors

  • Undeclared identifier, e.g.:

doy.cpp: In function `int main()': doy.cpp:25: `DayOfYear' undeclared (first use this function)[1]

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 the previous statement.

Internal Compiler Errors

These errors are not the same as normal compiler errors - they're caused by compiler itself and not the source code you're trying to compile. Which means, it's a bug in the compiler itself instead of the source code.

  • internal compiler error:
somefile.c:1001: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugs.gentoo.org/> for instructions.

References


Wikimedia Foundation. 2010.

Игры ⚽ Нужен реферат?

Look at other dictionaries:

  • compilation error — error in computer compilation commands; mistake made when bringing together different information (for a list, book, report, etc.) …   English contemporary dictionary

  • Human Error (punk rock band) — Human Error is a Swedish Punk Rock Band.HistoryThe story of Human Error starts in Stockholm the summer of 1994. Magnus Hjort saw someone staring at him in the street. The face looked vaguely familiar, but who was it? As it turned out it was… …   Wikipedia

  • Syntax error — In computer science a syntax error ( IPA: /ˈsɪntæks ɛrə(ɹ)/ ) refers to an error in the syntax of a sequence of characters or tokens that is intended to be written in a particular programming language.If a syntax error is encountered during… …   Wikipedia

  • syntax error — noun an error of language resulting from code that does not conform to the syntax of the programming language syntax errors can be recognized at compilation time a common syntax error is to omit a parenthesis • Topics: ↑computer science,… …   Useful english dictionary

  • C (programming language) — C The C Programming Language[1] (aka K R ) is the seminal book on C …   Wikipedia

  • Liste der Dateiendungen/E — In dieser Liste sind übliche Dateinamenserweiterungen aufgelistet, die in einigen Betriebssystemen (wie zum Beispiel Microsoft Windows) zur Unterscheidung von Dateiformaten verwendet werden. In anderen Betriebssystemen erfolgt die… …   Deutsch Wikipedia

  • Dummy code — In computer programming, dummy code is inserted in a program skeleton to simulate processing and avoid compilation error messages. It may involve empty function declarations, or functions that return a correct result only for a simple test case… …   Wikipedia

  • Skeleton (computer programming) — Skeleton programming is a style of computer programming based on simple high level program structures and so called dummy code. Program skeletons resemble pseudocode, but allow parsing, compilation and testing of the code. Dummy code is inserted… …   Wikipedia

  • Perl module — A Perl module is a discrete component of software for the Perl programming language. Technically, it is a particular set of conventions for using Perl s package mechanism that has become universally adopted.[discuss] A module defines its source… …   Wikipedia

  • Include guard — In the C and C++ programming languages, an #include guard, sometimes called a macro guard, is a particular construct used to avoid the problem of double inclusion when dealing with the #include directive. The addition of #include guards to a… …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”