Mail Archives: djgpp/2004/07/20/07:45:31
>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 -