Start New Discussion within our Software Development Community

I am trying to use the allegro game library (5.05) and I came across an error. It involved not being able to find -lgcc_eh so I switched it to static-lgcc_eh and it worked fine, that is until I got an error for not finding allegro-5.0.5-mt.dll . I looked in the .dll directory for it, and it was there. Tried it again. Still no avail. So I tried installing the DirectX files on their website (merging the two folders). Still does not work. I have tried looking all over the web for the topic, but Google was not playing nice (no results). Oh , and by the way, here is the code:

#include <stdio.h>
#include <allegro5/allegro.h>

int main(int argc, char **argv)

   if(!al_init()) {
      fprintf(stderr, "failed to initialize allegro!\n");
      return -1;

   display = al_create_display(640, 480);
   if(!display) {
      fprintf(stderr, "failed to create display!\n");
      return -1;





   return 0;

link to tutorial:
link to installing library:,_Code::Blocks_10.05_and_Allegro_5
(btw I don't know if this goes in game dev or programming, so sorry for any inconvience)

Sounds like your library installation is broken or you have not set up your compiler/linker environment properly. These problems are usually easy to fix with a little persistence. Make sure you read all installation instructions carefully for the library, specifically the part about integrating with your platform's IDE or compiler.

If allegro has a support forum, I would try asking this question there.

This article has been dead for over six months. Start a new discussion instead.