From: varobert AT colba DOT net Message-Id: <3.0.32.19990708190400.007a4c80@mail.colba.net> X-Sender: varobert AT mail DOT colba DOT net X-Mailer: Windows Eudora Pro Version 3.0 (32) Date: Thu, 08 Jul 1999 19:04:01 -0400 To: djgpp AT delorie DOT com Subject: Re: Newbie help request: -wall and prototyping Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Reply-To: djgpp AT delorie DOT com You should use gcc -Wall -o myprog.exe myproc.c The order here IS important because of the -o switch. At 08:25 PM 7/8/99 GMT, you wrote: >C and DJGPP gurus, > > I recently downloaded the djgpp compiler and the tutorial from Coronado >enterprises, in an attempt to learn how to program in C. I have patiently >worked through all the examples, compiling and running all the programs with no >trouble until I got to Chapter 5, which discusses prototyping. I think I >understand the basic Idea of prototyping (declaring functions ahead of time to >check return values the actual functions return?), but I am having trouble >getting gcc to check every program I write for prototyping. (This is >recommended in the tutorial, and I see It's value.) While scanning through the >mail archives at www.delorie.com/djgpp I found many people with the same >question. The answer? Use the -wall switch to enable most of the prototyping >checks when compiled. I played around with this for a while, and discovered >that I could not compile a prog with this, but coule recompile(?) a program >with it. For instance, I have the uncompiled source to a program, I will call >it myprog.c. I type: > > gcc -o -wall myprog.exe myprog.c > >on the command line in DOS and I get the error message: > > gcc.exe: myprog.exe: No such file or directory (ENOENT) > >but if I compile with the command: > > gcc -o myprog.exe myprog.c > >I get no error messages. I can then recompile with the -wall switch (in my >first example) and get some error messages, but apparently it compiles the >program. > >My questions are: > >1. Am I using the -wall switch correctly? I really don't know DOS all that >well, and could be screwing up there. > >2. Can I configure something to use -wall automatically, without me having >to type it in every time I want to use it? > >3. Do I have the Idea behind protyping correct? I am sure that I am close, >but not exactly right. > > >Thanks in Advance, >Carter >(Please e-mail reply, in addition to posting. I will check both frequently.) > > >