From: Arch Stanton Subject: Re: Problems compiling and running a program. Newsgroups: comp.os.msdos.djgpp Message-ID: <17599f0b.2fff36f2@usw-ex0101-002.remarq.com> Lines: 38 Bytes: 1516 X-Originating-Host: 4.54.96.217 Organization: http://www.remarq.com: The World's Usenet/Discussions Start Here References: <199910191854 DOT UAA01054 AT acp3bf DOT physik DOT rwth-aachen DOT de> X-Wren-Trace: eENmTk9WEVsQEQESElASHgRwSkdOSAwbRUBBAB4ZD1cCHFUMH1IB Date: Thu, 04 Nov 1999 15:16:37 -0800 NNTP-Posting-Host: 10.0.2.2 X-Complaints-To: wrenabuse AT remarq DOT com X-Trace: WReNphoon3 941757570 10.0.2.2 (Thu, 04 Nov 1999 15:19:30 PST) NNTP-Posting-Date: Thu, 04 Nov 1999 15:19:30 PST To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com In article <199910191854 DOT UAA01054 AT acp3bf DOT physik DOT rwth-aachen DOT de>, Hans-Bernhard Broeker wrote: > In article 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. Excellent post! I was having the same problem, and you solved it, plus gave me some new info. Thanks. * Sent from RemarQ http://www.remarq.com The Internet's Discussion Network * The fastest and easiest way to search and participate in Usenet - Free!