delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/07/08/17:25:16

From: hughett AT chaplin DOT med DOT upenn DOT edu (Paul Hughett)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Newbie help request: -wall and prototyping
Date: 8 Jul 1999 20:44:56 GMT
Organization: University of Pennsylvania
Lines: 34
Message-ID: <7m32k8$v25$1@netnews.upenn.edu>
References: <19990708162505 DOT 06504 DOT 00008761 AT ng-fo1 DOT aol DOT com>
NNTP-Posting-Host: chaplin.med.upenn.edu
X-Newsreader: TIN [version 1.2 PL2]
X-Newsreader: TIN [version 1.2 PL2]
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019