Common Compiler Error Messages and Other Problems

Steve Summit

Since C was originally a language designed for programmers who considered themselves experts, to this day a C compiler can be a somewhat cryptic beast to install and configure correctly, and to understand when it begins to complain about problems (it thinks) it has detected in your programs. The error messages that a C compiler prints usually have a direct relationship to some distinct problem in your program, but until you learn what they mean, it's not always immediately obvious what the messages are trying to tell you. This handout summarizes some of the error and warning messages commonly printed by C compilers, and gives you a slightly more comprehensive explanation of what they're really saying. (As we'll see, sometimes what they're saying is not that there's a problem with your program, but rather with the compiler itself.)

If your compiler prints some cryptic message which you can't find in this list, please let me know, so that I can add it.

One side note: sometimes, a compiler gets so badly confused by something weird which you've done that it goes off the deep end, spewing messages which have nothing to do with actual problems in your program (or which may have nothing to do with your program at all). If your compiler has printed scores of error messages, and you've dealt with the first few (that is, corrected the problems) but can't figure out what the rest are referring to, try compiling again anyway. It may be that the first problem(s) you fixed will make all (or most) of the other messages go away.

Error and Warning Messages

Compiler Installation Questions

Read Sequentially