The Allegro Wiki is migrating to github at

Getting Started

From Allegro Wiki
Jump to: navigation, search


If you want to use Allegro, you should be able to work comfortably with a computer and know the basics of programming in C or C++ either using an IDE or though the command line of your operating system. If you do not know how to program yet then please refer to the section Learn C or C++.

Installing Allegro

Allegro can be installed either from pre-built binaries or from sources. If you are on Windows, the recommended way to install Allegro is to install from pre-built binaries. On Windows, it is time-consuming and error prone to compile and install the required supporting libraries of Allegro. On Linux it's recommended to install Allegro from sources. It's much easier on Linux to compile and install the supporting libraries than it is on Windows. On OSX it's recommended that you install homebrew and then use this environment to build Allegro from sources.

With the release of Allegro 5.2, there is no longer an unstable branch (previously 5.1.x). Allegro 5.2 is source compatible but not binary compatible with Allegro 5.0. Some areas of the API will only be available if you define the ALLEGRO_UNSTABLE macro before including Allegro headers. For further information, see the official documentation.

The bleeding-edge development version can always be found on Allegro's git repository. See the instructions for obtaining the latest source on the official Allegro web site.

Installing From Binaries

The tutorials below show you how to install Allegro with the pre-built binaries using different IDEs and compilers. If you don't see your system listed here, see the manual building instructions in the next section.


The latest 5.2.x version binaries may be found here.

Mac OS



Installing From Sources

These tutorials show how to build Allegro from it's sources, which is necessary if there are no pre-built binaries available for your system, or you want to try out the unstable version of Allegro outside of its snapshot releases.


Mac OS




For an introduction how to use Allegro with Android see this page: Running_Allegro_applications_on_Android

Or follow the directions in the README_android.txt found in the source distribution of Allegro.

Using Allegro

Official Getting Started Guide

The official getting started guide is part of Allegro's official manual and will introduce you to the parts of the Allegro API that you will most likely need for developing a game of an audiovisual application.


These tutorials teach you how to use Allegro 5. Starting with the absolute bare necessities of display creation, and extending into all the various add-ons for music, and fonts and primitives.

These tutorials assume you are fairly competent in C or C++.

Problems Using Allegro

If you have problems using Allegro, this section provides help with what to do next.

Common Problems

Getting Help

At some point (usually sooner than later) you'll need help. There are two places where you can get help:

  • - This is best place to get help, with many knowlegeable and helpful users ready to be of assistance. Just sign up for an account, and ask your question on the forums.
  • #allegro at - The IRC often has people online that can provide live assistance. We sometimes get a little bit off-topic, but usually you'll find somebody to help you. You can access the IRC using your favorite desktop IRC client, or the webchat (type in #allegro in the list of channels you want to join).


This section contains various online resources that may be of interest if you use or want to learn how to use Allegro.

API Reference

The manual will list every function and type that may be useful in your Allegro program:

Allegro Websites

The following three websites are the main Allegro websites with the most general purpose content. Of course there are many other sites related to Allegro, but for the most part you can find links to them from these listed below.

  • Allegro Wiki You are here. This is the official wiki (maintained by Thomas Fjellstrom) for all things Allegro and includes helpful articles of all sorts.
  • A community website (maintained by Matthew Leverton) used mainly for the Depot (categorizes and hosts games) and the Forums. This is the best place to ask questions and keep in touch with the Allegro community.
  • Official Allegro Website The official website has the Allegro source, API reference, news, FAQs, etc.

External Recommended Websites

The following external web sites related to Allegro may be of interest to you.

Learn C or C++

  • [1] - An online C programming class.
  • [2] - An online book that will teach you the basics of C programming. Recommended if you already know a different programming language than C.
  • - A set of tutorials and guides for learning C++. Highly recommended for those new to C++.

Unofficial Addons

Allegro In Depth



  • Allegro 4 - Allegro 4 is an older, deprecated version of Allegro. Don't use it for new projects unless you have very good reason to.

Miscellaneous and Historical Articles