Are you having a GCC/G++ Compiler
Error?
If you answered YES!!!!! Then you have found the right place. This
page is
constantly growing page. It is meant to be a resource for CS students
at
Spelman College to help them figure out compiler errors when no
help can
be found.
Errors and Warnings?
The G++ compiler produces both warnings and errors. There is a reason
for these two types of diagnostics:
Errors: These messages are problems that make
it impossible for you to
compile your program. They are reported giving
you both the file name where
the error was found and the line number of
the error:
SourceFile.cc:17: - indicates the error is on line
#17 of the
Warnings: These messages indicated some unusual
condition in your code.
It is possible that it may cause an actual
error(in your case it will most likely
cause an error). The compilation process
will usually continue until an
error is uncovered. Warning message
look just like error messages, but will
have the word warning at the beginning of
the message:
SourceFile.cc:17: warning - indicates a warning
on line #17 of
the file called SourceFile
If you give the compiler the -Wall or -W
option then it will provide all warnings.
Otherwise, only the more harmful warnings
are displayed.
When should you use this page?
You should use this page as a first resort when you can not figure out
what a compiler error message means. If you still can't figure it out,
then this document may help you understand the response you get
from a peer, the TA, or your professor.
How to use this page?
Well for now(in the future in my copious spare time this may be
more sophisticated), you have to do the following:
-
Pick the error message you want to know about(The
best way to do
this is to pick the very first error message...especially
if there is a
whole ton of em!)
-
Browse the list of error messages and match one
to the message
you are getting
-
Click on the selected message
-
Try to fix your problem based on the information
for that message
-
If you don't see your error message and a friend
can't help you
send a message to the news group or send e-mail.
Which error message is yours?
Listing of Compiler Error Explanations
(NOTE: This listing only
contains
the beginning of the error message)
Compiler Error Messages(Parsing,
Type Checking, etc.)
Linker Error Messages(Final
stage of the compilation process)
Back
to the Class Page