delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/03/07/18:37:17

Date: Tue, 7 Mar 2000 13:56:57 +0600 (LKT)
From: Kalum Somaratna aka Grendel <kalum AT crosswinds DOT net>
X-Sender: root AT darkstar DOT grendel DOT net
To: Rodeo Red <rodeored AT netstep DOT net>
cc: djgpp AT delorie DOT com
Subject: Re: -wall messages
In-Reply-To: <1B04E3E8A3E99978.0AA67B6C38AFD998.3BC818F6DB8E9388@lp.airnews.net>
Message-ID: <Pine.LNX.4.10.10003071347130.929-100000@darkstar.grendel.net>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
Errors-To: dj-admin AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Mon, 6 Mar 2000, Rodeo Red wrote:

> This simple hello world program compiles fine but when I use -wall I get
> all the messages below. 

BTW it isnt -wall (simple letter w) but -Wall (note capital letter W)

> 
> If these aren't warning messaes what are they ? 

Could you please post the command line you used to compile the program,
It might also be a botched installation but i might be wrong.

> Is there any other way to turn on warning messages besides "- wall" ? 

Actually -Wall turns on _all_ the warnings. the libc refrence "info libc"
has a section dealing with the various warnings you can enable and disable
etc..

However -Wall is a very convenient way of enabling warnings, and AFAIK
some programmers refuse to accept code from a contributor if it fails to
compile without a single warning with the _Wall option turned on.

> 
> Is djgpp the same compiler they mean when they say "gcc" ? Why does
> everyone else seem to use gcc as a command line but I have to use gpp ? 

Well gcc and gpp are  actualy  front ends  _not_ the compiler per se, they
invoke the appropriate compiler (the c++ compiler or the C compiler).

one difference is that when you compile c++ programs with the command gcc
you must specify the -lstdcx option asking the linker to link in the c++
libraries.

So a sample compile using gcc would go,
gcc foo.cpp -o foo.exe -lstdcx

On the otherhand gpp automatically adds the -lstdcx option so if you are
using gpp,
gpp foo.cpp -o foo.exe is enough.


Grendel


Hi, I'm a signature virus. plz set me as your signature and help me spread
:)

- Raw text -


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