From: "John M. Aldrich" Newsgroups: comp.os.msdos.djgpp Subject: Re: Please Help!!! Date: Mon, 07 Apr 1997 06:42:54 -0700 Organization: Two pounds of chaos and a pinch of salt Lines: 44 Message-ID: <3348F9DE.613E@cs.com> References: <334983B4 DOT B83 AT enter DOT net> Reply-To: fighteer AT cs DOT com NNTP-Posting-Host: ppp226.cs.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Sean H wrote: > > #include > > void main(){ > cout << "Hello World"; > } > > It would not compile at all! Note: This is not a DPMI problem. This doesn't help in the slightest. Please post the error messages you got, at least. The DJGPP Frequently Asked Questions List (v2/faq210b.zip) has a comprehensive list of common problems encountered when compiling programs in chapter 6. If none of these help you, then please follow the instructions in chapter 6.12 for posting a system report so we can try to diagnose the problem. In the meantime, here are the most common reasons for "not compiling at all": 1) You didn't set the "DJGPP" environment variable as instructed in the 'readme.1st' file. 2) You are using the wrong command line to compile C++ programs (i.e., forgetting to link the C++ library). 3) You're missing the GNU Binutils package ('v2gnu/bnu27b.zip'). 4) You modified the "DJDIR=" line in 'djgpp.env' even though it tells you not to. 5) You unzipped the files without preserving the directory structure. BTW, did you cut and paste that sample directly from your code? If so, you misspelled "". Also, "void main()" is illegal under C++. It's non-ANSI even under C. Main must return an integer. -- John M. Aldrich * Anything that happens, happens. * Anything that, in happening, causes something else to happen, causes something else to happen. * Anything that, in happening, causes itself to happen again, happens again. * It doesn't necessarily do it in chronological order, though. --- Douglas Adams