Mail Archives: djgpp/1999/01/24/18:28:35
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
- Raw text -