Everything seems ok with that code.. Maybe post the exact error that you are getting.
See if this will compile for you.
Code:
const int FAIL = -1
const int SUCCESS = 0;
int initAlleg()
{
allegro_init();
if(install_mouse() == -1)
{
allegro_message(allegro_error);
return FAIL;
}
if(install_keyboard() < 0)
{
allegro_message(allegro_error);
return FAIL;
}
if(install_timer() < 0)
{
allegro_message(allegro_error);
return FAIL;
}
set_color_depth(16);
if(set_gfx_mode(GFX_AUTODETECT_WINDOWED, 800, 600, 0, 0) != 0)
{
allegro_message(allegro_error);
return FAIL;
}
//set_window_title("Extreme Space");
return SUCCESS;
}
int main()
{
initAlleg();
}
END_OF_MAIN()