The Allegro Wiki is migrating to github at https://github.com/liballeg/allegro_wiki/wiki

Build/BCC32

From Allegro Wiki
Jump to: navigation, search

Overview

Borland Builder, now known as C++ Builder, can build Allegro applications, but cannot build the Allegro library from source. In order to use the bcc32 makefile that comes with Allegro, you must first obtain Allegro DLLs that were built with another compiler.

Requirements

Setting up C++ Builder

  • Download and install version 5.5 of the C++ Builder. By default, it will go in the c:\borland\bcc55 folder.
  • Create two config files and place them inside the c:\borland\bcc55\bin folder.

bcc32.cfg

-I"c:\borland\bcc55\include"
-L"c:\borland\bcc55\lib"

ilink32.cfg

-L"c:\borland\bcc55\lib"
  • Create the environment variable BCC32DIR=c:\bcc55
  • Extract only the usr/local/wbin/make.exe file from UnxUtils.zip to your desktop, rename it to gmake.exe, and copy it to c:\borland\bcc55\bin.

Building Allegro

  1. Extract the Allegro source zip file to c:\allegro
  2. Download the Allegro DLLs (for the same version as the source) from Allegro.cc and place them in your c:\windows\system32 folder.
  3. Open up a MS-DOS prompt.
  4. Type cd\allegro to change to the Allegro folder.
  5. Type fix bcc32
  6. Type gmake all to build the static Release, Profiling, Debugging and versions.
  7. Type gmake installall to install the static libraries.

Troubleshooting

  • If you are using Allegro 4.2.2, before you can run gmake, you must edit the lib\bcc32\alleg.def file and remove the line that says LIBRARY.