Mail Archives: djgpp/1997/02/12/17:52:16
On Tue, 11 Feb 1997 22:50:01 -0800, Golem <myork AT auracom DOT com> wrote:
>ugh! i can't beleive i got an error for djgpp when i first ran it!!
>here is my source code, saved as 'hello1.cc':
> main() {
> printf("Hello world!");
> }
>and when i used the msdos command line:
> gcc -c -Wall hello1.cc
>i get a 'warning: implicit declaration of function 'int printf(...)'
>what the..?? although it goes smoothly from .o to .exe, i want to know
>what that warning was about, and where i get a list of warnings/errors
>for djgcc.
As Fred said, the function printf(...) is declared in stdio.h, which
you should #include in your program, at the start, i.e.:
#include <stdio.h>
This should remove the warning.
>i am using the 32-bit protected mode (version 2, i think)
>and what about my keyboard handler that worked in ms C? can i just
>(rewrite it) or will the protected mode not let me change the dos
>interrupt? aaargh!!
It will need some rewriting; however, I strongly recommend that you
get Allegro. It's a library of useful games routines, including a
decent keyboard handler, graphics routines, sound, etc etc. Look at:
http://www.talula.demon.co/allegro/
George Foot
- Raw text -