词条 | Compilation error |
释义 |
ExamplesCommon C++ compilation errors
doy.cpp:25: `DayOfYear' undeclared (first use this function)[3] This means that the variable "DayOfYear" is trying to be used before being declared.
xyz.cpp: In function `int main()': xyz.cpp:6: `cout' undeclared (first use this function) [3]This means that the programmer most likely forgot to include iostream.
somefile.cpp:24: parse error before `something' [4]This could mean that a semi-colon is missing at the end of the previous statement. Internal Compiler ErrorsAn internal compiler error (commonly abbreviated as ICE) is an error that occurs not due to erroneous source code, but rather due to a bug in the compiler itself. They can sometimes be worked around by making small, insignificant changes to the source code around the line indicated by the error (if such a line is indicated at all),[5]{{better source needed|date=February 2019}} but sometimes larger changes must be made, such as refactoring the code, to avoid certain constructs. Using a different compiler or different version of the compiler may solve the issue and be an acceptable solution in some cases. When an internal compiler error is reached many compilers do not output a standard error, but instead output a shortened version, with additional files attached, which are only provided for internal compiler errors. This is in order to insure that the program doesn't crash when logging the error, which would make solving the error nigh impossible. The additional files attached for internal compiler errors usually have special formats that they save as, such as Example of an internal compiler error: somefile.c:1001: internal compiler error: Segmentation faultPlease submit a full bug report,with preprocessed source if appropriate.See <http://bugs.gentoo.org/> for instructions. References1. ^{{Cite web|url=https://nodejs.org/api/errors.html#errors_class_syntaxerror|title=Errors {{!}} Node.js v7.9.0 Documentation|website=nodejs.org|language=en|access-date=2017-04-14}} {{compu-prog-stub}}2. ^{{Cite web|url=https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SyntaxError|title=SyntaxError|website=Mozilla Developer Network|language=en-US|access-date=2017-04-14}} 3. ^1 {{cite web|title=Common C++ Compiler and Linker Errors|url=http://www.csee.umbc.edu/courses/undergraduate/341/misc/CommonErrors.shtml}} 4. ^{{cite web|title=Compiler, Linker and Run-Time Errors|url=http://www.cs.bu.edu/teaching/cpp/debugging/errors/}} 5. ^{{Cite web|url=http://wiki.c2.com/?CompilerBug|title=Compiler Bug|last=Cunningham|first=Ward|date=2010-03-18|website=WikiWikiWeb|archive-url=|archive-date=|dead-url=|access-date=2017-04-14}} 6. ^{{Cite web|url=http://jagadesh4java.blogspot.com/2014/09/analyzing-jvm-crash.html|title=Analyzing a JVM Crash|last=జగదేశ్|access-date=2017-04-15}} 2 : Debugging|Computer errors |
随便看 |
|
开放百科全书收录14589846条英语、德语、日语等多语种百科知识,基本涵盖了大多数领域的百科知识,是一部内容自由、开放的电子版国际百科全书。