Date: Tue, 19 Oct 1999 20:54:06 +0200 From: Hans-Bernhard Broeker Message-Id: <199910191854.UAA01054@acp3bf.physik.rwth-aachen.de> To: djgpp AT delorie DOT com Subject: Re: Problems compiling and running a program. Newsgroups: comp.os.msdos.djgpp Organization: RWTH Aachen, III. physikalisches Institut B X-Newsreader: TIN [version 1.2 PL2] Reply-To: djgpp AT delorie DOT com 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.