Mail Archives: djgpp/1999/10/19/15:59:09
In article <B45C46D3AF14D3119C560090274F38D424C6BB AT DAEX01> you wrote:
> To Whom It May Concern;
> I purchased the book "Teach Yourself C++ in 24 hours" and so far I am
> understanding
> everything, but I can't seem to compile and run a program; my steps are:
> #1 - Type a program using EDIT.
> #2 - Save the file with a *.CPP extension.
> #3 - run gxx -o hello.cpp hello.exe (from c:\djgpp)
That command line is very wrong. Must be either of the following
gxx -o hello.exe hello.cpp
gxx hello.cpp -o hello.exe
The '-o' option means: 'create a program with the following name', so
the name must come immediately after it. For added benefit, you should
probably add other options, to get as many warnings as you can from
gcc: '-O2 -Wall -W', maybe even '-ansi -pedantic'. But then, you'll
probably find that with those settings, none of the samples from that
type of book will get through the compiler: they're just to badly
written.
--
Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de)
Even if all the snow were burnt, ashes would remain.
- Raw text -