GRX Graphics Library

The latest official public release GRX v2.3 is available from this site. 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:
    2. DJGPP: DJGPP/contrib/grx23
      Linux: /usr/src/grx-2.3
    3. unzip the GRX source archive in the GRX dir:
    4. DOS: pkunzip -d
      Unix: unzip
    5. unzip the GRX font archive in the same base dir:
    6. DOS: pkunzip -d
      Unix: unzip

    Set the environment variables

    1. set the default driver and graphics mode info:
    2. SET GRX20DRV=<driver> gw <width> gh <height> nc <colors>
    3. (very useful but not required)
      Available drivers for

    4. DOS : stdvga, stdega, et4000, cl5426, mach64, ati28800, VESA, memory
      Linux: svgalib, xwin, memory
      X11: xwin, memory
    5. set the GRX font dir
    6. SET GRXFONT=<directory for the GRX fonts>
    7. 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:
    5. 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