delorie.com/djgpp/doc/ug/intro/installing-djgpp.html   search  
Guide: Installing DJGPP

OK, so you've got a directory full of ZIP files. Lots of megabytes, and no clue where to start! The first step is to decide what you want to do with djgpp - this tells you what to unzip. For each zip file, use either unzip or pkunzip -d to extract the files. If you forget the -d for pkzip, all the files will be in one directory, which is not what you want.

Once you select the zips you want (see the help below), you should unzip them all in the same directory. For the purposes of this Guide, we'll assume you chose C:\DJGPP (or c:/djgpp in unix parlance) as the directory. After unzipping them all, you'll see various directories:

bin
binaries (programs)
include
include files
lib
libraries
manifest
lists of what's in each zip
zoneinfo
timezone definitions (deleteable if you don't need them)

You might also have these:

src
djgpp sources
gnu
gnu sources
contrib
contributed toolkits

Now that you've got everything unzipped, there are two things you have to do to prepare your system to use djgpp:

  1. Inside the djgpp directory there is a bin directory with all the programs in it. You must modify your PATH environment variable so that this directory is included. An example line in your AUTOEXEC.BAT file would looks like this:
    set PATH=C:\DJGPP\BIN;%PATH%
    
  2. Inside the djgpp directory is a file called djgpp.env. Don't modify it unless a package tells you to do so! You must add a new environment variable DJGPP that refers to this file:
    set DJGPP=c:/djgpp/djgpp.env
    
    Note that you can use upper or lower case here, and either forward (unix) or backward (dos) slashes. (Most DJGPP programs support both styles of slashes; however, being Unix ports, they might sometimes support forward slashes better. When in doubt, try forward slashes, like the example.)

This next section lists the most popular (or most often forgotten) parts of DJGPP to install. Your distribution probably contains lots of other zips (when I wrote this, there were 106 separate zips!). Most of them have documentation explaining about themselves, so go poking around and see what you've got.

Basic Functionality

Everyone should install these, whether they need them or not. Why? Because it may not be obvious that you need it, but they're commonly referred to on the newsgroup. Also, note that the version you have may have newer version numbers in the file name; just use the newer file if that's the case.

v2/readme.1st
Everyone should read this file. It includes important information that is as up-to-date as the zips, including a brief getting started section.

v2/djdev201.zip
You need this. This is the basic runtime and development package, and includes such things as the include files, C libraries, standard utilities, FPU emulator, and timezone definition files.

v2/faq210b.zip
The frequently asked questions file. Before you ask anyone else, read the FAQ!

v2gnu/txi390b.zip
This includes the info.exe program, which lets you read the online documentation. Run "info" to start the online document system.

v2gnu/gcc2721b.zip
This is the C compiler. It also includes the pre-processor, which many other languages use, and the GNU compiler support library, which nearly all programs will need.

v2gnu/bnu27b.zip
This is the assembler and linker, and a few other programs (like the librarian). You'll need these for all languages.

v2gnu/mak375b.zip
Make is a program that keeps track of how to build your programs in the least number of required steps. Not everyone uses it, but it's strongly recommended.

v2misc/csdpmi3b.zip
You'll need this if you're running under plain DOS. DJGPP requires a DPMI server. Windows, OS/2, and Linux provide one, as does QDPMI and 386MAX. If you have none of these, get this file, which includes cwsdpmi.exe - our own free DPMI server.

Other Languages

The basic functionality allows you to write C programs, but DJGPP supports much more than that.

v2gnu/bsn124b.zip
Bison is a yacc replacement. You'll need this to compile language grammars (*.y).

v2gnu/flx252b.zip
Flex is a lex replacement. You'll need this to compile lexical parsers (*.l).

v2gnu/gpc20b.zip
Pascal compiler.

v2gnu/gpp2721b.zip
C++ compiler.

v2gnu/lgp271b.zip
C++ libraries. You'll need these if you use streams, the GNU class library, etc.

v2gnu/obc2721b.zip
Objective C compiler.

Programming Utilities and Helpers

These zips contain programs that will help you write your source, or port existing packages from unix.

v2apps/rhide13b.zip
This is an Integrated Development Environment, which combines editor, compiler, online help, and debugger all in one easy to use interface. It's probably the best place to start if you're new to command-line compilers.

v2gnu/em1934*.zip
GNU Emacs. This is the preferred text editor for many hard-core Unix programmers. You can also invoke the compiler or make from within, as well as read the online documentation and play games. You'll need to install all these zips; read the emacs.README first.

v2gnu/gdb416b.zip
The GNU debugger. This is an extremely powerful full symbolic debugger, but you'd best read the docs before trying to use it.

v2gnu/bsh1147b.zip
Bash is GNU's ``bourne-again shell'', a replacement for the popular /bin/sh and Korn shell. You'll need this for some unix programs that have shell scripts; some people use it as their default shell instead of COMMAND.COM.

Ports of Unix programs

v2gnu/fil313b.zip
GNU Fileutils, including ls, rm, cp, mv, and others. Highlights of the latest port: ls supports colorization of files (like on Linux), ln -s knows about DJGPP-style "symlinks" (see symlink feature of DJGPP in the FAQ), install -s will strip executables on the fly, and all the utilities support long filenames on Windows 9x and numbered backups (even on plain DOS). This package is a must if you want to run Unix shell scripts, as they use some of these utilities a lot.

v2gnu/shl112b.zip
GNU Shell utilities. A must if you use the port of bash or want to run Unix Makefiles, but some utilities (such as env or test) can also be very useful on their own right.

v2gnu/txt119b.zip
GNU Textutils. Includes many useful programs, such as sort, wc, cat, join, paste, od, and uniq. Unix shell scripts and Makefiles call some of these a lot, so you should install this package if you run them.

v2gnu/gzp124b.zip
The GNU compression utilities, gunzip, gzcat, and gzip

v2gnu/dif271b.zip
GNU Diffutils (diff, cmp, diff3, sdiff), and their docs. If you need to submit patches or changes to DJGPP or GNU sources, you will need the GNU diff program from this package.

v2gnu/sed118b.zip
GNU sed (a stream editor) program and its docs. Many ported packages require it during the build process on MSDOS.

v2gnu/grep20b.zip
GNU grep package and its docs. You need this if you use emacs (which has commands that invoke grep) or if you want to run Unix shells and Makefiles.

v2gnu/find41b.zip
GNU find allows you to locate files on your hard drive and do interesting things with them (bigram code find frcode locate xargs)

v2gnu/gwk302b.zip
GNU awk

v2gnu/lss321b.zip
GNU less

v2gnu/pat21b.zip
GNU patch program and docs. Required to apply patches to DJGPP sources.

Toolkits

These zips contain various libraries of pre-compiled functions. You don't need these, but they can speed up program development if one of them does something useful for you.

v2tk/alleg21.zip
Allegro is a game library, including sound, joystick, mouse, and video routines. Very popular.

v2tk/bccgrx20.zip
This module lets you compile programs that use Borland's graphics functions. You'll need grx also.

v2tk/grx20.zip
DJGPP's base graphics library.

v2tk/jptui37d.zip
A textual user interface kit.

v2tk/pdc22.zip
Public Domain Curses emulation, for porting Unix programs.

v2tk/rsxntdj1.zip
Use this to write Win95 and WinNT programs with DJGPP.

v2tk/tvisionb.zip
For porting TurboVision programs.

v2tk/sw21_dj2.zip
v2tk/sw21_doc.zip
v2tk/sw21_p1.zip
v2tk/sw21_p2.zip
C++ GUI that provides a NeXT-like windowing interface.

Sources

Nearly all the zips include a second zip that has the sources in it. For zips that end in b.zip, the sources are in a corresponding s.zip. Some exceptions are listed here.

v2/djlsr201.zip
Sources to DJGPP's C library, core utilities, and runtime support. If you have the disk space, it's worth it to download and install these for two reasons. First, they're a good learning resource. Second, you can fix bugs if you find them.

v2/djtst201.zip
Sources for programs that are used to test the C library; not general purpose test programs but they to demostrate much of the functionality.


  webmaster     delorie software   privacy  
  Copyright © 1997     Updated Jul 1997