Next: C is similar to
Up: September 11
Previous: Introduction to UNIX
Introduction to C
We use the Gnu compiler gcc. Here's an example, assuming
that somebody created a C source file called program.c in the
current directory:
gcc -Wall -ansi -pedantic -o program program.c
- -Wall prints ``all'' (not exactly all, but lots of)
warnings.
- -ansi scolds you if your C source is not compliant
with the ANSI (1989) standard.
- -pedantic scolds you for even more things, which may
be legal C, but are considered (by the compiler, at least) to be
bad.
- -o program says put the executable in
program
Danny Heap
2002-12-16