allegro newbie error

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • lumpybanana247
    New Member
    • Apr 2007
    • 134

    allegro newbie error

    I'm guessing this is a stupid question, but this won't compile in Dev-C++(Bloodshed)

    Code:
    #include <allegro.h>
    int main(){
     
        allegro_init();
        install_keyboard();
        set_gfx_mode( GFX_AUTODETECT, 640, 480, 0, 0);
        readkey();
        return 0;
    }   
    END_OF_MAIN();
    [Linker error] undefined reference to `_WinMain'
    [Linker error] undefined reference to `_install_alleg ro_version_chec k'
    [Linker error] undefined reference to `install_keyboa rd'
    [Linker error] undefined reference to `set_gfx_mode'
    [Linker error] undefined reference to `readkey'
    ld returned 1 exit status

    thanks
  • ilikepython
    Recognized Expert Contributor
    • Feb 2007
    • 844

    #2
    Originally posted by lumpybanana247
    I'm guessing this is a stupid question, but this won't compile in Dev-C++(Bloodshed)

    Code:
    #include <allegro.h>
    int main(){
     
        allegro_init();
        install_keyboard();
        set_gfx_mode( GFX_AUTODETECT, 640, 480, 0, 0);
        readkey();
        return 0;
    }   
    END_OF_MAIN();



    thanks
    Make you sure you have linked to the correct files. Go to Project -> Project Options -> Parameters and click on "Add object or LIbrary". Then add the correct allegro library file. I don't know much about allegro so I'm not sure if this will solve your problem.

    Comment

    • lumpybanana247
      New Member
      • Apr 2007
      • 134

      #3
      that solved my problem. this unlocks a whole new level of coding. lol

      thank you
      --Nate

      Comment

      • ilikepython
        Recognized Expert Contributor
        • Feb 2007
        • 844

        #4
        Originally posted by lumpybanana247
        that solved my problem. this unlocks a whole new level of coding. lol

        thank you
        --Nate
        No problem. :()

        ,.,.

        Comment

        Working...