Mail Archives: djgpp/1997/04/08/00:56:03
Sean H wrote:
>
> #include <isotream.h>
>
> 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 "<iostream.h>". Also, "void main()" is illegal under
C++. It's non-ANSI even under C. Main must return an integer.
--
John M. Aldrich <fighteer AT cs DOT com>
* 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
- Raw text -