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?

> 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;

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.