The Allegro Wiki is migrating to github at

Install Allegro5 From SVN/Windows

From Allegro Wiki
Jump to: navigation, search
Outdated: Need to update directions to use Git instead (edit)

Tools to install

CMake - go link Here, download and run the cmake installer.

An SVN client - I downloaded SlikSVN, but there are several clients available.

You need an archive program that can handle tar.gz files. I used 7Zip.

Note I haven't tried this on Windows with anything but Visual Studio 2008.


DirectX SDK - Download the DirectX SDK from link here I had no problems using the June 2010 SDK.

If you're using MinGW, you can download a minimal version of the DirectX SDK from Get the file and extract the contents somewhere. Then copy the lib and include folders to your mingw directory, overwriting all duplicate files.

ZLIB - The homepage is link here. I was able to compile successfully with the binary DLL package for 1.2.5

OpenAL - Download the OpenALCoreSDK from link here

FreeType - Go to link Freetype and download the bin and lib zip files.

Physfs - Link is link here. I used to 2.0.1 tar.gz file.

Dumb - Download 0.9.3 from link here

Ogg, Vorbis, FLAC - Download from link here

Note that some of these you only need for some of the addons, but I built allegro with all of the addons that cmake checks for.

Getting sources from SVN

Since I used SlikSVN, I did this part from the Visual Studio 2008 Command Prompt. I added c:\Program Files\SlikSVN\bin to the path variable like this:

setx path=%PATH%;"C:\Program Files\SlikSVN\bin" - the %PATH% and quotes are important

Now change to the directory to where you want to download allegro. cd "\users\name\documents\programming" or something.

from there type:

svn co allegro-5.0

cd allegro-5.0 then md build then cd build

Compiling/Installing Dependencies

The easiest way to get things working is to create a directory called deps in allegro-5.0.

Unzip the zlib125-dll file, copy the include directory to allegro-5.0\deps. Copy the library file from lib and zlib1.dll to allegro-5.0\deps

Install the OpenALCoreSDK (the zip file contains an install program). Copy OpenAL32.lib from C:\Program Files\OpenAL 1.1 SDK\libs\Win32 to allegro-5.0\deps along with the include directory in c:\Program Files\OpenAL 1.1 SDK

From the freetype-*-bin zipfile, copy the lib file from the lib directory along with everything in the include directory to deps/include. Also copy the dll file from bin to deps.

For dumb, start Visual Studio 2008 and open the vc6 project file in vc6. After the project is converted, build the release version of the dumb project. Open the project directory and copy the lib and dll files from Release to deps, and copy the dumb.h file to deps/include.

Ogg and Vorbis have VS2008 solutions, and they compiled pretty easily. You may have to copy libogg.lib an the ogg include directory somewhere in the path, but I simply modified the projects for vorbis and vorbisfile to use the library from where I had it installed.

FLAC was a little harder to build because the project files are setup to use NASMW.exe. I downloaded and installed a newer version of NASM, which installed to c:\Program Files\nasm. To get the libFLAC and libFLAC++ projects to build you will have to right click on each nasm source file and replace nasmw.exe in the custom build step to wherever your nasm exe is. For me it was "c:\program files\nasm\bin\nasm.exe". You will also need to tell VS where to find the ogg includes and library files. After building, copy the .lib files and .dll files to deps, and everthing in the include directory to deps/include.

Configure and Build Allegro 5.0

Next, go back to your VS 2008 Command Prompt, change to the allegro-5.0\build directory and type:


Set the source directory to allegro-5.0 and the build directory to allegro-5.0\build.

Click Configure.

The only libraries that I had trouble being autodetected were ogg, vorbis, and vorbisfile. If you click on Grouped Entries, things are a bit more organized. Under Vorbis, make sure it displays the include directory and lib file from deps. If not, click in the field to add them. Do the same for OGG. Vorbisfile is listed under "ungrouped items". Another thing I noticed is that even though all the other DirectX files were autodetected, D3D9x.lib wasn't. It is in the lib directory of the SDK in Program Files.

Hit Configure again, and everything should check out ok. One thing: cmake automatically chooses the static FLAC library. If you want the dll, change that to the dynamic library. If you want to build A5 to link statically, uncheck the box for shared.

Next, simply open the Allegro project solution in VS2008 and build the "build all" project.

If you left the install directory to the default, you will have to be administrator to install the library. I simply ran VS2008 as administrator, opened the allegro solution, and built the INSTALL project. All of the .lib, include, and .dll files should be copied to the appropriate directories.

Hopefully this helps some.