codice:
#include <allegro.h>
#include <stdio.h>
#include <string.h>
int main()
{
int x=10,y=10;
int depth;
allegro_init();
set_window_title("allegro");
install_keyboard();
install_timer();
install_mouse();
install_sound(DIGI_AUTODETECT, MIDI_AUTODETECT, 0);
depth = desktop_color_depth();
set_color_depth ( depth );
set_gfx_mode(GFX_AUTODETECT_WINDOWED, 800, 600, 0, 0);
BITMAP *background;
PALETTE prova;
background = load_bitmap("background_1.bmp",prova);
masked_blit(background,screen,0,0,0,0,800,600);
while(!key[KEY_ESC])
{
}
return 0;
}
END_OF_MAIN()
quando compilo, il compilatore mi segna errore, probabilmente su
codice:
BITMAP *background;
PALETTE prova;
background = load_bitmap("background_1.bmp",prova);
blit(background,screen,0,0,0,0,800,600);
E DICE:
multiple definition of `_mangled_main()'
first defined here
multiple definition of `WinMain@16'
first defined here
ld returned 1 exit status
c:\percorso del file...\Makefile.win [Build Error] [game.exe] Error 1
qualcuno può spiegarmi perché?? grazie in anticipo.