0

G'day all. I have been trying some Allegro applications within my VC8 compiler. Everything has been linking fine until this one:

#include <allegro.h>

BITMAP *myImage;

int main()
{
    allegro_init();
    install_keyboard();
    set_color_depth(16);
    set_gfx_mode( GFX_AUTODETECT,1280,600,0,0);

    myImage = ( "G:\\My Images\\box.bmp", NULL);

    acquire_screen();

    draw_sprite( screen, myImage, 200, 150);

    release_screen();

    readkey();

    return 0;

}

END_OF_MAIN();

The program after hitting F7 returns with 0 errors 0 warnings.
Ctrl F5 then gives me:

Microsoft Visual C++ Debug Library
Debug Error!
Program:...
This application has requested the Runtime to terminate in an unusual way. Please contact the application's support team for more information.
(Press Retry to Debug the application)

Any Ideas Anyone?

2
Contributors
1
Reply
2
Views
10 Years
Discussion Span
Last Post by Salem
0

> myImage = ( "G:\\My Images\\box.bmp", NULL);
Were you expecting (or hoping) to call a function at this point?

Because all you've written here is myImage = NULL;

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.