Xref: news2.mv.net comp.os.msdos.djgpp:8108 From: "John M. Aldrich" Newsgroups: comp.os.msdos.djgpp Subject: Re: HELP MEEEEEE!!!! Date: Sat, 31 Aug 1996 12:24:48 -0700 Organization: Three pounds of chaos and a pinch of salt Lines: 53 Message-ID: <32289180.543D@cs.com> References: <01bb9627.474de9c0$146332cc AT robmatthews> NNTP-Posting-Host: ppp224.cs.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: Matthews DJ-Gateway: from newsgroup comp.os.msdos.djgpp Matthews wrote: > > OK...here's my problem. I've really just started at this stuff (actually > jsut got C++ today)...so here's my question. I did a program...a VERY > SIMPLE program...straight from a book (yes I'm learning...I have to)...but > it doesn't want to work. Here is what the program says: > > #include > > void main() > { > puts( "-------MY PROGRAM WORKS!------"); > } > > And that's it...you think that it would work right...NOT REALLY! It keeps > giving me an error saying: > > Error: Function 'puts' should have a prototype in function main() > > And that's all...I can't figure out where I should be getting this > "prototype" from...PLEASE HELP SAVE THE MIND OF A VERGING PSYCOPATH! > RM > AKA > TU That's odd - that doesn't look like a DJGPP error message. Are you sure you are using DJGPP C++? Is there any chance you have some other compiler in your PATH before DJGPP? At any rate, please follow the bug report procedure outlined in the FAQ (v2/faq201b.zip) by posting a message containing the following information: Your CONFIG.SYS and AUTOEXEC.BAT. Your environment as reported by SET. (type set >environ.lst and post that) The output of 'go32-v2' when invoked without arguments. Add -v to your 'gcc' command line and post the resulting output. To do this, use the following command: redir -o gcc.lst -eo gcc -v ... (where '...' is the rest of your normal gcc command line). It sounds like you have some sort of configuration problem to me. P.S.: I won't go into it now, but 'void main()' is not the right way to define main. If that's what your book recommends, I'd get a better one. -- John M. Aldrich, aka Fighteer I -----BEGIN GEEK CODE BLOCK----- Version: 3.1 GCS d- s+:- a-->? c++>$ U@>++$ p>+ L>++ E>+ W+>++ N++ o+ K? w(---) O- M-- V? PS+ PE Y+ PGP- t+(-) 5- X- R+ tv+() b+++ DI++ D++ G e(*)>++++ h!() !r !y+() ------END GEEK CODE BLOCK------