Hints About Compiling and Debugging C Programs
Randall J. Fisher
rfisher@ecn.purdue.edu
Disclaimer
Forward
The purpose of this document is to try to pass along some of my experience with
compiling and debugging to help shorten the time you spend developing code.
It is also intended to cut down on the amount of direct assistance that you
need to finish your projects by providing you with some basic guidance.
This document will continue to be updated as I (re)discover warnings and errors
and their causes.
Finally, this document is currently directed at gcc and similar compilers.
This isn't clear from the title, so I apologize if this is not what you are
looking for.
Table of Contents
- Some practices that can help save effort.
- Common compile-time gcc errors and warnings
and their possible causes.
- Common run-time gcc errors and warnings
and their possible causes.
Bibliography
- The standard book on C is The C Programming Language by
Brian W. Kernighan and Dennis M. Ritchie. It is published by PTR Prentice
Hall, Englewood Cliffs, New Jersey 07632. The second edition contains
information on ANSI C and is copyrighted 1988, 1978 by Bell Telephone
Laboratories, Inc. I have found this book to be more useful as a reference
once I understood how C worked than as a beginning text.
- The primary document on GCC is Using and Porting GNU GCC
by Richard M. Stallman. The version I have was last updated June 29, 1996,
and is for version 2.7.2.1 of the compiler. This is free and has a good
index; but the printed version I have doesn't have page numbers, so its less
useful than it could be. It is quite complete though.
This page was last modified
.