Compiling Allegro with Watcom

This page describes how to compile and use the Allegro library (version 4.2.3.1, 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. In this case, you only need to follow steps 1, 2, 4, 7, 9 below.

The process

  1. Download the Allegro 4.2.3.1 source code.
  2. You need Watcom C 10.6 or later, or Open Watcom 1.0 or later. I used Open Watcom 1.9.
  3. 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.
  4. In INCLUDE\ALLEGRO\PLATFORM\ALWATCOM.H, comment out line 36.
  5. In DEMO\DISPLAY.H, comment out line 7 and put a typedef definition around the definition of enum ANIMATION_TYPE that follows.
  6. Clear your WCC386, WCL386, and WPP386 variables or you might get the error "Arg list too long".
  7. Execute: fix.bat watcom
  8. Execute: make (DJGPP's Make, not Watcom's WMake)
  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