How-To:  Install a DJGPP CVS snapshot

Last modified: Sun Jun 28 20:00:26 EDT 2020

Based on instructions generously provided by Juan Manuel Guerrero.

Preface:  The State of the Dist

Quoting from the primary site,  "DJGPP is a complete 32-bit C/C++ development system for Intel 80386 (and higher) PCs running DOS.  It includes ports of many GNU development utilities."  By providing a robust 32-bit platform and DOS implementations of many standard library functions, DJGPP makes it possible to build and run many Unix applications under DOS, and consequently in a DOS box under any 32-bit version of Windows, with less porting effort.

The following was written in October 2014 to explain how to build the CVS version of DJGPP 2.04.  These instructions are now out of date since DJGPP 2.05 was released 2015-11-08.

As of October 2014, the last release of DJGPP was version 2.03, in 2002.  A beta of DJGPP 2.04 emerged in 2003, but it never progressed to final release.  Updated versions of GCC, libraries, and applications continued to be released for both 2.03 and the 2.04 beta.  However, some important fixes could be obtained only by building the latest versions of the DJGPP platform files from the CVS repository sources.  This article explains how to get a working build environment with the latest versions of everything.


The DJGPP archive is best accessed through a fast mirror.  The "current" directory is 2.03; "beta" is 2.04.  Essential files and utilities are divided between subdirectories v2 and v2gnu; additional prebuilt libraries and apps are found in v2tk and v2apps.  A directory for other etceteras, v2misc, exists only in current.

CAUTION:  You cannot mix libraries.  If you have decided to use version 2.04 (whether the as-is beta or the CVS repository version), you cannot link applications with libraries from the current (2.03) directory.  Compiler, binutils, and libraries must match!

A quick way to get a CVS snapshot is from  For actual CVS retrieval, see the DJGPP CVS page.


If using hard-core DOS, both a Long File Name (LFN) driver and a DPMI provider must be installed.  Recommended:

If using a DOS box (CMD.EXE) in a 32-bit version of Windows, LFN and DPMI should just work.

Additional configuration advice is provided in the DJGPP FAQ.


When unpacking zip files, use the unzip32.exe that is distributed with DJGPP to prevent file names from getting broken.

File names on NTFS must be created in the DOS namespace.  Linux ntfs-3g doesn't do that.  Similarly, the LFN implementation in Linux vfat is not entirely compatible with doslfn.  It only works reliably if you mount the vfat partition with the option shortname=winnt.

Stage 1:  Install build environment from 2.04 "beta"

Following is the minimum set of packages needed to successfully complete the next stage.  Newer versions of the various packages will appear over time.  Feel free to use the latest.

beta/v2 2211289Nov 30
beta/v2gnu6628096Sep 2
beta/v2gnu641348Sep 26
beta/v2gnu434398Jan 9
beta/v2gnu2446889Oct 12
beta/v2gnu730551Jun 27
beta/v2gnu21142487Jul 17
beta/v2gnu10969714Jul 17
beta/v2gnu629895Sep 2
beta/v2gnu2943279Dec 15
beta/v2gnu8363181Aug 31
beta/v2gnu363193Jul 14
beta/v2gnu755391Oct 10
beta/v2gnu429978Sep 5
beta/v2gnu2362671Oct 12
beta/v2gnu1142732Jan 9
beta/v2gnu2305385Oct 12

Unzip all files in C:\DJGPP and set the following environment variables accordingly:


In addition, a command-line zip program must be installed in the path.  One that works is the DJGPP-compiled Info-ZIP binary available from the FreeDOS archive.

Stage 2:  Build CVS snapshot

2.1.  Unpack the CVS snapshot in a working directory, not inside the C:\DJGPP installation.  We will call it C:\BUILD.

2.2.  Copy 2 linker scripts from the snapshot into the C:\DJGPP installation, overwriting the existing versions:


2.3.  CD into the C:\BUILD\DJGPP\SRC directory and start the build process by typing "make".  It may take some time to complete.  If the process finishes without error messages, you win.

2.4.  Zip up the newly built files by CDing into C:\BUILD\DJGPP\DISTRIB and typing "mkdist".  The resulting packages, which replace those from beta/v2, end up in C:\BUILD\DJGPP\ZIPS.

883592Oct 19
2625207Oct 19
1997227Oct 19
1056391Oct 19
581835Oct 19
407962Oct 19

Stage 3:  Merge built packages into 2.04 installation

At a minimum, the that was installed previously is now obsolete.  A brave person could simply unzip the newly built packages in C:\DJGPP.  To prevent any obsolete files from accidentally getting used, a more cautious person would erase the C:\DJGPP directory and recreate it with the new packages substituting for the old ones.