title: Allegro 5 crashing when loading the font
body: <p>I've recently gotten started with Allegro 5, and I tried loading a font. This is my code:</p>
  
  <pre><code>#include &lt;allegro5/allegro.h&gt;
  #include &lt;allegro5/allegro_font.h&gt;
  #include &lt;allegro5/allegro_ttf.h&gt;
  #include &lt;allegro5/allegro_native_dialog.h&gt;
  
  int main()
  {
      al_init_font_addon();
      al_init_ttf_addon();
      ALLEGRO_DISPLAY *display = NULL;
      if(!al_init())
      {
          al_show_native_message_box(NULL, NULL, NULL, "Error", NULL, NULL);
          return -1;
      }
      display = al_create_display(800, 800);
      ALLEGRO_FONT *font1 = al_load_font("arial.ttf", 12, 0);
  
      if(!font1)
      {
          al_show_native_message_box(NULL, NULL, NULL, "Error 3", NULL, NULL);
          return -3;
      }
      al_clear_to_color(al_map_rgb(0, 0, 0));
      al_draw_text(font1, al_map_rgb(255, 0, 255), 50, 50, ALLEGRO_ALIGN_CENTRE, "Hello font size: 12");
      al_flip_display();
  
      al_rest(3.0);
      al_destroy_font(font1);
      al_destroy_display(display);
      return 0;
  }
  </code></pre>
  
  <p>However upon running the code it returns -3 which means there was an error loading the font. What am I doing wrong? I'm using Codeblocks IDE with Windows XP SP 3 mingw compiler. What am I doing wrong?</p>
  
  <p>EDIT: 
  I fixed it by adding the ttf file to my project directory. Vote to close</p>