Mail Archives: djgpp/1999/07/08/17:25:16
DJCarterJr (djcarterjr AT aol DOT com) wrote:
: I type:
: gcc -o -wall myprog.exe myprog.c
: [and get error messages instead of a compilation]
The order of options and parameters matters--the name of the output
file MUST be the next thing after the -o option. What you have done
is to request the compiler to compile and link the programs myprog.exe
and myprog.c and to store the result in a file named -wall; probably
not what you meant. Try saying instead
gcc -Wall -o myprog.exe myprog.c
The capitalization also matters. On Unix, the option must be -Wall
rather than -wall; I suspect the same is true even on DOS, but check
your documentation to be sure.
: 2. Can I configure something to use -wall automatically, without me
: having to type it in every time I want to use it?
You might want to look into learning about the make program, which will
do the compiling and linking of a multi-file program automatically when
you type just make.
: 3. Do I have the Idea behind protyping correct? I am sure that I am
: close, but not exactly right.
You seem to have the basic idea okay, but there are probably still some
subtleties left to confuse you. We'll wait for that next post.
Paul Hughett
- Raw text -