DJGPP: Public Domain Compilers for Win95/98/NT

 

THE DOWNLOAD FILES

DJGPP is DJ Delorie's implementation of GNU's suit of compilers for Win95/98/NT. It includes a number of utilities, but you'll have to be prepared to do a little work yourself to install it (don't worry, this will (largely) walk you through the process). Of course, it will save you some money, since it is free.

The first thing that you need to consider is that you'll have to download several files, each of about 1.5 Mbytes, to your computer. If you are trying to do this over a 9600 baud modem you are liable to find that it will take SEVERAL hours, perhaps overnight. Might be better to consider some other way of transferring these files.

First of all, you'll need something to unzip the *.zip files -- and this unzipper MUST support long filenames. I recommend that you just download

Minimally you will need the C distribution (you need this for C, C++, and for Fortran), which consists of the files The last is the readme file provided with the distribution. Its essential contents (as far as installation is concerned) will be repeated here.

For C++ programmers, you'll also need

while Fortran enthusiasts will want to download, in addition to the C distribution, In addition, there are several optional zip files as follows;

INSTALLATION INSTRUCTIONS

  1. create the directory C:\DJGPP on your own computer (open Windows Explorer, click on C:, select `File', `New ---> Folder', and type in `DJGPP'. Click somewhere else to finalize.)
  2. All C, C++, F77 users must download (by clicking on each file below, waiting for it to load, then select `File' and `Save As' -- save the file in C:\DJGPP),
    1. bnu281b.zip
    2. djdev202.zip
    3. gcc295b.zip
    4. readme.1st
    5. unzip32.exe
    and optionally download
    1. gdb418b.zip
    2. mak377b.zip
  3. C++ users must download (by clicking on each file below, wait for it to load, then select `File' and `Save As' -- save the file in C:\DJGPP),
    1. gpp295b.zip
    2. lgpp295b.zip
    and optionally download (recommended)
    1. rhide14b.zip
  4. F77 users must download (by clicking on the file below, wait for it to load, then select `File' and `Save As' -- save it in C:\DJGPP),
    1. g77-295b.zip (NOTE: this file was incomplete prior to 12:30 pm, Sep 24, 1999)
  5. Open a DOS Command window (`Start', `Programs', `MSDos', this will be a black text-mode window). Type cd c:\djgpp to get into the DJGPP home directory.
  6. Use unzip32 in the current directory to unzip each of the zip files you downloaded. For example, type It will occasionally ask if you want to replace an existing file - I'm pretty sure these are all identical, so it shouldn't matter whether you answer yes or no to this question.
  7. Set up your environment. This means you must edit your C:\AUTOEXEC.BAT file. In the same DOS Command window, type and add the following lines to the end of the file (use the `Page Down' key and the down arrrow to get there) Type   Alt-f s   to save the autoexec.bat file, followed by  Alt-f x  to exit the editor (or use the appropriate `File' menu items), where Alt is the Alt key next to your space bar, and Alt-f means `hold down the Alt key while hitting the f key once'.

You should now be ready to compile any programs you care to write. To get the system to know about the new environment, it is probably best to reboot your computer (one of the sad truths about the Windows environment -- zillions of reboots!!).

You can use the Dos Command editor to create your programs, then, still within the Command window, you can type

to compile your program and produce an executable called myprog.exe (the [-o name] option specifies the executable basename). You can run this program by typing myprog at the prompt. For Fortran users, the command would be while for C++ users it would be

If you have downloaded the rhide program, you can run it to create a Borland C++ like environment. C and C++ users should try it out.