CS13002 Programming and Data Structures

Spring semester

DJGPP : Download and Install


FTP Site: ftp://ftp.fh-koblenz.de/pub/DJGPP/current/

Note: Don't install djgpp in /dev as djgpp treats that directory specially.

Note: If your FTP site doesn't have the selected files, please choose another one, like ftp.delorie.com

Note: Do not install DJGPP in a directory that requires long file name support (i.e. no spaces, 8.3 characters)

Note: The FAQ has information on adjusting the registry so that one installation works with both long and short filenames (Win 95/98/NT and DOS)

Note: To view online documentation and help, run the "info" program.

Note: RHIDE has an online help viewer also.

Note: Start RHIDE in the directory with your sources, so that it puts the .exe there also.

Note: In RHIDE, press F1 twice to get help on help

Note: Emacs has an online help viewer also.

Note: Sample compile command: gcc hello.c -o hello.exe

Note: Use gxx (or append -lstdcx to your gcc command line) to compile and link C++ programs (*.cc)

Note: If you get errors about cout, iostream.h, streambuf.h, or libiostream.a, please read the FAQ

Note: Append -lobjc to your gcc command line to link Objective-C programs

Note: Assember files should have a .S extension.

Read the file README.1ST before you do anything else with DJGPP! It has important installation and usage instructions.

unzip32.exe       to unzip the zip files         95 kb

copying.dj        DJGPP Copyright info            3 kb
djdev203.zip      DJGPP Basic Development Kit   1.5 mb
faq230b.zip       Frequently Asked Questions    664 kb
readme.1st        Installation instructions      22 kb

rhid149b.zip      RHIDE (Borland-like IDE)      2.4 mb

bnu215b.zip       Basic assembler, linker       3.3 mb
bsn135b.zip       Bison                         185 kb
em2005b.zip       Emacs binaries                7.5 mb
flx254b.zip       Flex                          189 kb
gcc342b.zip       Basic GCC compiler            3.6 mb
gdb611b.zip       GNU debugger                  1.5 mb
gpp342b.zip       C++ compiler                  3.9 mb
mak3791b.zip      Make (processes makefiles)    267 kb
objc342b.zip      Objective-C compiler          2.3 mb
txi47b.zip        Info file viewer              773 kb

ntlfn08b.zip      NT Long File Name support      25 kb

Total bytes to download: 29,463,632

Installation Instructions

Use Explorer to create a folder for DJGPP. My Computer, Drive C, File->New->Folder, "DJGPP".

Use djgpp's unzip32.exe to unzip all the zips you downloaded into the C:\DJGPP folder. Don't unzip them each into separate folders - unzip them all to the same place. The directory structure inside each zip file should be preserved, so you end up with files like c:\djgpp\bin\gcc.exe and c:\djgpp\include\stdio.h

C:\> mkdir djgpp
C:\> cd djgpp
C:\DJGPP> unzip32 d:\tmp\djdev203.zip
C:\DJGPP> unzip32 d:\tmp\faq230b.zip
C:\DJGPP> unzip32 d:\tmp\rhid149b.zip
C:\DJGPP> unzip32 d:\tmp\bnu215b.zip
C:\DJGPP> unzip32 d:\tmp\bsn135b.zip
C:\DJGPP> unzip32 d:\tmp\em2005b.zip
C:\DJGPP> unzip32 d:\tmp\flx254b.zip
C:\DJGPP> unzip32 d:\tmp\gcc342b.zip
C:\DJGPP> unzip32 d:\tmp\gdb611b.zip
C:\DJGPP> unzip32 d:\tmp\gpp342b.zip
C:\DJGPP> unzip32 d:\tmp\mak3791b.zip
C:\DJGPP> unzip32 d:\tmp\objc342b.zip
C:\DJGPP> unzip32 d:\tmp\txi47b.zip
C:\DJGPP> unzip32 d:\tmp\ntlfn08b.zip  (NT users only)

You may alternatively use the batch file unzipall.bat in order to unzip all the archives by a single command.

When properly installed, you should have a c:\djgpp\bin directory, and in it should be at least gcc.exe, as.exe, and stubify.exe. If all the files are in c:\djgpp with no subdirectories, or you see directories like c:\djgpp\djdev203\, you need to delete everything and try a different unzip program.

Make sure you use the djgpp's unzip32, or some other unzip that doesn't support long file names. If you install with WinNT long file names, C++ programs won't compile. Another option is to use pkunzip instead (see the MS-DOS install instructions) or read the FAQ about the NameNumericTail registry key.

Right-click My Computer, select Properties. Select the Advanced tab, then the Environment Variables button. Edit the Path (or PATH, whichever exists) system variable to include C:\DJGPP\BIN at the front. (If you are not an administrator, add it to the PATH variable in the User Variables section, or add a new PATH user environment variable which contains only C:\DJGPP\BIN) Add a new variable DJGPP set to C:\DJGPP\DJGPP.ENV (system variable if possible, user variable if not an administrator) .

You'll need to close and reopen your MS-DOS windows for these changes to take effect.

Rather than edit your autoexec files and/or global environment, you may wish to create a djgpp shortcut instead. To do this, create a c:\djgpp\djgpp.bat that has lines like this:

@echo off
set PATH=c:\djgpp\bin;%PATH%
set DJGPP=c:\djgpp\djgpp.env
chdir c:\djgpp\mystuff   (or any other directory)
command
(you can replace that last line with any other shell you'd like)


Course home