GRX graphics library

NEW: GRX v2.3.1 (= GRX v2.3 with the patch below and some bugfixes) has been uploaded on 22 June 2000. See our download page for details.

A patch for updating GRX v2.3 has been uploaded on 12 June 2000. This patch contains - among other bugfixes - necessary updates for GRX v2.3 to work correctly with newer releases of GCC. It also integrates BCC2GRX into GRX. Get it from here:

To apply the patch, cd to the GRX source directory and then type:

zcat grx23.update.000520.gz | patch -p1 -l

This has to be done to a fresh GRX source installation, i.e. after unzipping

The latest official public release GRX v2.3 is available from this site and soon from SimTel.Net or its mirrors.
Make sure you get all three files (, and grx23rme.1st) and carefully read the instructions below and in grx23rme.1st before installing GRX.


New features in GRX v2.3

A detailed changelog is available

GRX supported platforms

Currently GRX directly supports the following platforms:
DOS DJGPP v1.12 GCC 2.6.3
DOS DJGPP v2.01 GCC 2.6.3, 2.7.2, 2.8.1
DOS Borland C++ BCC 2.0, 3.1, 4.52; 16bit only
DOS Watcom C++ v11.0; 32bit only
Linux svgalib GCC 2.7.2, 2.8.1
Linux X11R6 GCC 2.7.2, 2.8.1
Solaris X11R5 GCC 2.7.2, SUN cc v4.1
DEC alpha
GRX should work on any X11R5 (or later) system after a few changes in makedefs.gnu and makedefs.x11.

Most makefiles (DJGPP and Unix systems) require GNU make

Installing GRX

Unzip the GRX archives

  1. create a directory for the GRX file tree. Examples:
    DJGPP: DJGPP/contrib/grx23
    Linux: /usr/src/grx-2.3
  2. unzip the GRX source archive in the GRX dir:
    DOS: pkunzip -d
    Unix: unzip
  3. unzip the GRX font archive in the same base dir:
    DOS: pkunzip -d
    Unix: unzip

Set the environment variables

  1. set the default driver and graphics mode info: SET GRX20DRV=<driver> gw <width> gh <height> nc <colors> (very useful but not required)
    Available drivers for
    DOS : stdvga, stdega, et4000, cl5426, mach64, ati28800, VESA, memory
    Linux: svgalib, xwin, memory
    X11: xwin, memory
  2. set the GRX font dir SET GRXFONT=<directory for the GRX fonts> This is required for GRX graphics text output. Path: <GRX base>/fonts
    NOTE: You can define a default font directory when compiling GRX. E.g, if you installed the fonts in /usr/local/lib/grx/fonts add
        CCOPT += -DGRX_DEFAULT_FONT_PATH="/usr/local/lib/grx/fonts"
    to makedefs.gnu (Linux / GNU-make example)

Compiling GRX

This is only required if there's no pre-compiled GRX for your system or you want to change GRX or the library configuration.
  1. Go to GRX base dir and check the makefile and makedefs file for your system setup
  2. Switch to src sub dir and check the makefile
  3. run make -f <your makefile>
    (some system may need additional arguments here !)
  4. if every thing worked fine go to <GRX base>/test, check the makefile and build all test files / examples: make -f <your makefile>

Testing GRX

  1. go to <GRX base>/bin and run the modetest program. If you don't have a modetest (or modtst16) binary, do need to compile GRX first.
  2. Build and run the other examples (see above)

Installing GRX for your compiler

You'll either need to copy some GRX files to places where your compiler will find them (1) or to change your compiler setup so it will find the GRX files in their default place (2).
  1. Copy the library from <GRX base>/lib/<your system> to the compiler library directory.
    Copy the header files from <GRX base>/include to your compiler include directory
  2. See compiler documentation. Either change the default compiler behavior (eg., change djgpp.env) or use command line switches to tell the compiler where to find the GRX files.


Due to slight changes in grx20.h you'll have to recompile your programs. Just relinking it won't work in most cases.

Older GRX versions

Some information for older GRX version is still available. See GRX v2.2


If you have problems installing or running GRX check this site ( for updates, pre-compiled libs, ... first.

Check out the known problems with the current release before reporting a problem or bug

If this doesn't help, check your system/compiler FAQ (eg., the DJGPP v2 FAQ is at

Check out the DJGPP newsgroup comp.os.msdos.djgpp (archive at

Send a problem report to the GRX mailing list, to comp.os.msdos.djgpp or directly email me at

[ Back to homepage ]   [ mail comment ]    Last modified: Mon Aug 10 21:00:00 MET DST 1998