Mail Archives: djgpp/1997/04/24/09:30:21
Michael Flegel (FLEGEL AT physnet DOT uni-hamburg DOT de) wrote:
: I've just been wondering: I use printf and exit and all those fancy
: commands :-), which I used to have to include stdlib.h and conio.h and
: stuff in my old BC3.1, Now that I use DJGPP, I compile and link my little
: "hello world" proggy using printf, getch and uhhh, nothing else, but I
: don'T have to include any header files.
: I can live with that, but it makes me a little edgy, not to know where my
: stuff comes from. So I'd appreciate an explanation from anyone who knows.
: (Maybe it had something to do wit the fact that I link it as a C and not
: C++ program... don'T know)
I don't really use C much, but I think compiling with `-Wall' should warn
you about implicit declarations of functions. In C it will still link the
program, whereas in C++ it would complain that there was no exact match
for the (implicit) prototype. If you put `-Werror' on the command line
too, gcc will return an error code if it produces any warnings, halting
make/RHIDE/whatever you're using.
--
George Foot <mert0407 AT sable DOT ox DOT ac DOT uk>
Merton College, Oxford
- Raw text -