Sender: nate AT cartsys DOT com Message-ID: <36ABABFD.68CA3E38@cartsys.com> Date: Sun, 24 Jan 1999 15:25:50 -0800 From: Nate Eldredge X-Mailer: Mozilla 4.08 [en] (X11; I; Linux 2.0.36 i586) MIME-Version: 1.0 To: djgpp AT delorie DOT com Subject: Re: help with c++ compilier References: <36AB9DDB DOT 386441F4 AT roadrunner DOT com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Reply-To: djgpp AT delorie DOT com Bill Kramer wrote: > > Hi DJ, > > I have been to the site to download everything I need to run the c++ > compiler from the following web site: > > http://www.delorie.com/djgpp/zip-picker.cgi (and also one other site for > c++). > > I do have 2 questions however, > 1. The documentation directs me to modify my autoexec.bat file for > setting an environment name and setting a path name. I am not sure how > to make this change. I had assumed I would find the autoexec.bat on the > C: drive however since this is a bat file I wasn't sure where to find > it. In the root directory. If you don't have it, create it. > 2. On the documentation to run the compiler it reads: > > You can also combine the compilation and link steps, like this: > gcc -Wall -o myprog.exe mymain.c mysub1.c mysub2.c > > My questions are: > 1. where does this command get entered? The command line of a DOS window. > 2. does myprog mean I put in my file name and mymain ??? and > mysub1??? and mysub2??? (confused on what the "my sections are > here I would assume that if my file name is for example ..... test.cpp > then I would use the following command: > gcc -Wall -o testprog.exe testmain.c testsub1.c testsub2.c The example is for compiling a program made up of multiple source files, which you probably won't have to worry about for a while. If you create your source file as foo.cpp, the command `gxx -o foo.exe foo.cpp' will compile and link it. (Actually, as long as you have only one source file, you can ignore the distinction between compiling and linking.) `-Wall' is a good idea, too. -- Nate Eldredge nate AT cartsys DOT com