delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2004/07/20/07:45:31

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
Lines: 30
X-Admin: news AT aol DOT com
From: sterten AT aol DOT com (Sterten)
Newsgroups: comp.os.msdos.djgpp
Date: 20 Jul 2004 11:38:02 GMT
References: <2m4apdFht547U1 AT uni-berlin DOT de>
Organization: AOL Bertelsmann Online GmbH & Co. KG http://www.germany.aol.com
Subject: Re: strange error
Message-ID: <20040720073802.22465.00000145@mb-m11.aol.com>
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

 >Your program has at least the following errors:
 >
 >#include <stdio.h> is missing
 >#include <stdlib.h> is missing

I assume, that stdio.h and/or stdlib.h are appended automatically
(why else would the program run ?) and that including these
again only blows the whole thing up unnecessarily.

 >main is defined without giving a return type
 >main doesn't return a value

I don't need such a value here. Once I saw a recommendation somewhere
to declare main as int. Don't remember, why.

 >Your usage of gcc also appears at least slightly flawed.  You compile
 >without enabling warning flags (or you'ld have known about all of the
 >above right away), and you apparently strip executables
 >unconditionally, 

hmm, I didn't know that I can put conditions. Will check this

 >making any use of the '-g' option or discussion of
 >its effects quite pointless.

I don't understand. 
-g makes the program run correctly, while omitting it doesn't. (why ?)


--Guenter.

- Raw text -


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