I want to compile a C file with gcc, and my question is this: Is it possible when we have a mistake in our code (for example, forgetting a semicolon) for gcc to show us the source code containing the error(s)?
Thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
gccwill print out the (approximate) line and position where the error occurred, and in which file.But, no,
gccdoesn’t repeat your code; you’ll have to open the file, and go to that line.Typically, your Integrated Development Environment, however, will allow you to click on the error reference in the
gccoutput, and take you directly to that line. This is true of (at least) Eclipse, Anjuta, and Emacs.(And always use
-Wextra)