From: mert0407 AT sable DOT ox DOT ac DOT uk (George Foot) Newsgroups: comp.os.msdos.djgpp Subject: Re: hello world Date: Wed, 12 Feb 1997 17:24:56 GMT Organization: Oxford University Lines: 34 Message-ID: <3301fbcd.2363628@news.ox.ac.uk> References: <5draph$fhk$2 AT thor DOT atcon DOT com> NNTP-Posting-Host: mc31.merton.ox.ac.uk To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp On Tue, 11 Feb 1997 22:50:01 -0800, Golem 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 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