Compiling Allegro with Watcom

This page describes how to compile and use the Allegro library (version, the last available for DOS) with Watcom or Open Watcom on DOS.

If you only want to compile an Allegro application without compiling the library yourself, you can download my precompiled version.

The process

  1. Download the Allegro source code
  2. .
  3. You need Watcom C 10.6 or later, or Open Watcom 1.0 or later. I used Open Watcom 1.9.
  4. Install DJGPP (unfortunately). Allegro requires some of its parts for its compilation process. See the DOCS\BUILD\WATCOM.TXT file in the Allegro source code archive for details. Note: DJGPP Make crashed for me on FreeDOS, but not on Windows 98. Your mileage may vary.
  5. In INCLUDE\ALLEGRO\PLATFORM\ALWATCOM.H, comment out line 36.
  6. In DEMO\DISPLAY.H, comment out line 7 and put a typedef definition around the definition of enum ANIMATION_TYPE that follows.
  7. Clear your WCC386, WCL386, and WPP386 variables or you might get the error "Arg list too long".
  8. Execute "fix.bat watcom" and "make" as in the instructions. They should succeed.
  9. You should now be able to compile Allegro applications. Note that Allegro requires them to be compiled with the options "/s/3s".

First published on .
Last updated on .

Table of contents

Contact me