Mail Archives: djgpp/1998/12/28/02:16:27
leonj AT geocities DOT com wrote:
> This is the only I can help you with. Kinda simple, but I dunno why
> it
> happend to me too. Change the return type for main from just main()
> "int
> main" and then at the very end of the program type "return 0".
The prototype
extern main();
_does_ have the return type int -- in C, the return type defaults to int
if not specified. That is, the program
main() { return 0; }
is perfectly valid ANSI C (but doesn't do anything).
The problem was that the program was explicitly declared to return void,
which is an ANSI violation.
> I also have he same book and have not been able to compile anything
> from it.
It's clear that the book was never intended to be used with DJGPP; I
think the original poster was just mistaken. The FAQ will help with
converting such programs to DJGPP.
--
Erik Max Francis / email max AT alcyone DOT com / whois mf303 / icq 16063900
Alcyone Systems / irc maxxon (efnet) / finger max AT finger DOT alcyone DOT com
San Jose, CA / languages En, Eo / web http://www.alcyone.com/max/
USA / icbm 37 20 07 N 121 53 38 W / &tSftDotIotE
\
/ God is love, but get it in writing.
/ Gypsy Rose Lee
- Raw text -