- Online Community Forums » Installation, Setup & Configuration » How to setup Allegro in Eclipse

This thread is locked; no one can reply to it. rss feed Print
How to setup Allegro in Eclipse
Member #10,145
August 2008

Hi, I'm a complete Allegro newbie and I need help setting it up in Eclipse Ganymede with CDT installed. I would appreciate step-by-step instructions please. Thank You!

Member #7,982
November 2006

Eclipse C++ and MinGW installation.

Download Eclipse IDE for C/C++ Developers from and unpack it.
Download MinGW Automated installer from and install C, C++ (or gcc, g++), also download GNU Make and GNU Source-Level Debugger, unpack them to your MinGW directory.

Set enviromental variable MINGDIR to your MinGW directory, for example: D:\MinGW.
To set it, go to Control panel -> System -> Advanced -> Enviroment variables. Add this variable to the system variables, also add %MINGDIR%\bin in the beginning of the PATH variable.

Restart your computer, just to be sure that variables will be set.

Download Allegro and unpack it to any directory, for example D:\allegro\.
Start -> run -> cmd

Get into Allegro dir, type fix.bat mingw, then type mingw32-make and press enter. Allegro should compile now, if you'll get error then try downloading compiled version, otherwise type mingw32-make install and press enter.

If Allegro is installed properly or you downloaded it compiled and extracted to your Allegro directory (let's just use D:\allegro\) run Eclipse, make a new project and:

1) Right click on your project name in the Projects explorer, select Properties.
2) Select C/C++ Build, then select Settings, on the left should appear window with Tool settings
3) Select GCC C or C++ Compiler then select Directories, add Include path "D:/allegro/include", add in the other debugging flags (Debbuging submenu) -ggdb3 (just for later debugging).
4) Select MinGW C/C++ Linker then select Libraries, add alleg to the Libraries (-l) and add directory "D:/allegro/lib" to the Librariers search path. If you want to get rid of this additional console window (Allegro graphics mode) add -Wl,--subsystem,windows to the Linker flags in the Miscellaneous submenu (thanks gnolam).

Now you should be able to build Allegro applications, build it (ctrl+b).
Open run dialog (play button, and this little arrow just to the left).
If your C/C++ Application is something like this: Debug/<program>.exe then get into Arguments window, in the bottom you should see Working directory, set it to ${workspace_loc:<PROJECT NAME>/Debug}, where <PROJECT NAME> is your project name of course.

How to run Debug (you have to build your project before):
Click this little arrow next to the Debug icon, select Debug as, then your application should be under Local C/C++ Application, check settings in the Arguments window, should be like those above, if not, set them as written above. Go into the Debugger tab, select MinGW Debugger, GDB command set should be "Standard (Windows") and protocol "mi". Also it's nice to turn off Load shared library symbols automatically in the Shared library tab,
to not get spammed by strange symbols without sources ;)

If you can't see any variables in Debug perspective, then exit Eclipse and run it again.

I think that's all to develop applications under Eclipse CDT platform, have fun. :D

Member #7,827
October 2006

Also, see this wiki article.

"For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18
[SiegeLord's Abode][Codes]:[DAllegro5]:[RustAllegro]

Go to: