Witam, mam problem z kompilacją prostego kodu w C++ Allegro ponieważ prawie do każdej linijki kodu pojawia się błąd
was no declared in this scope
Kod programu:
#include <allegro.h>
int main()
{
allegro_init();
install_keyboard();
set_color_depth( 16 );
set_gfx_mode( GFX_AUTODETECT_WINDOWED, 800, 600, 0, 0 );
clear_to_color( screen, makecol( 128, 128, 128 ) );
// RYSOWANIE
// Piksel
putpixel( screen, 10, 20, makecol( 255, 0, 255 ) );
putpixel( screen, 10, 30, makecol( 255, 255, 0 ) );
// Kąt
arc( screen, SCREEN_W / 2, SCREEN_H / 2, itofix( 0 ), itofix( 128 ), 100, makecol( 0, 0, 0 ) );
// Linie
hline( screen, 20, 400, 500, makecol( 255, 255, 255 ) );
vline( screen, 20, 400, 500, makecol( 255, 255, 255 ) );
line( screen, 400, 200, 600, 400, makecol( 255, 128, 64 ) );
// Trójkąt
triangle( screen, 20, 20, 60, 60, 20, 60, makecol( 255, 0, 128 ) );
// Prostokąt
rectfill( screen, 500, 400, 700, 500, makecol( 128, 30, 30 ) );
rect( screen, 490, 390, 710, 510, makecol( 30, 30, 30 ) );
// Okrąg
circle( screen, 100, 100, 50, makecol( 255, 64, 64 ) );
circlefill( screen, 100, 100, 40, makecol( 255, 64, 64 ) );
// Elipsa
ellipse( screen, 300, 50, 60, 40, makecol( 128, 20, 128 ) );
ellipsefill( screen, 300, 50, 50, 30, makecol( 128, 20, 20 ) );
// Wypełnianie
ellipse( screen, 700, 200, 80, 30, makecol( 50, 50, 50 ) );
floodfill( screen, 700, 200, makecol( 20, 120, 20 ) );
readkey();
allegro_exit();
return 0;
}
END_OF_MAIN();
Kod pochodzi ze strony: http://cpp0x.pl/kursy/Kurs-Allegro-4-x-C++/Prymitywy/65