Menu

Allegro - IStart-up problems - Installation.

2002-09-04
2012-09-26
  • Nobody/Anonymous

    Hi. I have just installed Allegro to my c:\Dev-Cpp directory so now my c:\Dev-Cpp directory looks like:
    --------------------------------------------------------------------
    Dev-Cpp
    +-Allegro
      - bin
      - Dll
    +-Examples
      - icons
    -+Include
    - Lang
    +-lib
    +-mingw32
    -  Templates
    -----------------------------------------------
    When I run a simple exampel from the "C:\Dev-Cpp\Examples\Allegro directory like the program exhallo.c which looks like (I get the same errors with other allegro programs as well) :
    --------------------------------------------------------
    #include "allegro.h"

    int main()
    {
       /* you should always do this at the start of Allegro programs */
       allegro_init();

       /* set up the keyboard handler */
       install_keyboard();

       /* set a graphics mode sized 320x200 */
       if (set_gfx_mode(GFX_SAFE, 320, 200, 0, 0) != 0) {
          set_gfx_mode(GFX_TEXT, 0, 0, 0, 0);
          allegro_message("Unable to set any graphic mode\n%s\n", allegro_error);
          return 1;
       }

       /* set the color palette */
       set_palette(desktop_palette);

       /* clear the screen to white */
       clear_to_color(screen, makecol(255, 255, 255));

       /* you don't need to do this, but on some platforms (eg. Windows) things
        * will be drawn more quickly if you always acquire the screen before
        * trying to draw onto it.
        */
       acquire_screen();

       /* set transparent text */
       text_mode(-1);

       /* write some text to the screen with black letters */
       textout_centre(screen, font, "Hello, world!", SCREEN_W/2, SCREEN_H/2, makecol(0,0,0));

       /* you must always release bitmaps before calling any input functions */
       release_screen();

       /* wait for a keypress */
       readkey();

       return 0;
    }
    END_OF_MAIN();
    ---------------------------------------------------------------
    I get around 155 errormessages from the compiler. The first one is in line 36 in some include file somewhere. (C:/DEV-CPP/Include/allegro/base.h is the message).

    Is this just a simple error beacuse of me installing allegro wrongly (in the wrong directory) ? (I have used the automatic installer from the internet : http://www.bloodshed.net/dev/packages/index.html.
    only changing the suggested directory name when starting the installer from c:\Dev-c++ to c:\Dev-Cpp).

    BR Kurt

     
    • Nobody/Anonymous

      Hi,
      the ".exe" installer you can download at the DEV ressource site doesn't really work because the templates it installs are not correct for the 4.9.x versions of DEV. With version 4.01 it works correctly. Somewhere in that forum someone postet the correct templates for the newer DEV versions. I've tried them and they work.
      As I've heart a new Allegro DevPack is in production, maybe you should wait until it can be downloaded at the ressource site.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.