Skip to content

Install Djgpp on DOS

Damián Silvani edited this page Aug 10, 2018 · 2 revisions

These instructions were taken from the official DJGPP website. Follow this example, substituting paths as appropriate (type the bold parts).

First download the following files and copy them to your DOS drive:

C:\> mkdir djgpp
C:\> cd 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\djdev205.zip
C:\DJGPP> unzip32 d:\tmp\faq230b.zip
C:\DJGPP> unzip32 d:\tmp\bnu2311b.zip
C:\DJGPP> unzip32 d:\tmp\gcc820b.zip
C:\DJGPP> unzip32 d:\tmp\gdb801b.zip
C:\DJGPP> unzip32 d:\tmp\gpp820b.zip
C:\DJGPP> unzip32 d:\tmp\mak421b.zip
C:\DJGPP> unzip32 d:\tmp\csdpmi7b.zip

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.

You need to update your C:\CONFIG.SYS to include the following lines (edit the first to suit your installation, and if these lines already exist, it's OK if they have larger numbers than these examples):

shell=c:\dos\command.com c:\dos /e:2048 /p
files=40
fcbs=40,0

You need to update your C:\AUTOEXEC.BAT to include the following lines:

set PATH=C:\DJGPP\BIN;%PATH%
set DJGPP=C:\DJGPP\DJGPP.ENV

Note that the PATH statement should follow any other PATH statements, or you may edit an existing PATH statement.

You'll need to reboot your computer for these changes to take effect. If you are using a DOS emulator like DOSBox, just restart it.

Clone this wiki locally