View Full Version: help with allegro

C++ Learning Community > C++ for Linux > help with allegro


Title: help with allegro
Description: wont work


jasonpeinko - July 30, 2005 10:31 PM (GMT)
when i thy this code
CODE

#include <allegro.h>
int main()
{
allegro_init();

set_gfx_mode(GFX_SAFE, 640, 480, 0, 0);

install_keyboard();

textout (screen, font , "Allegro is working! o yea and HELLO WORLD!", 1, 1, 10);

while (! key[KEY_ESC])
poll_keyboard();

allegro_exit();
return 0;

}

END_OF_MAIN();


i use this to compile

CODE

g++ test.cpp


jasonpeinko - July 30, 2005 11:29 PM (GMT)
i got it so i get this error using kdevelop not g++
CODE

main.cpp:28: warning: `textout' is deprecated (declared at


after it says
CODE

/usr/include/allegro/alcompat.h:169)

thepillowz - August 1, 2005 07:42 PM (GMT)
The problem is that your using a depreceted function "texout" it should be texout_ex so change the line:
CODE
textout (screen, font , "Allegro is working! o yea and HELLO WORLD!", 1, 1, 10);

to
CODE
texout_ex(screen,font,"Allegro is working! o yea and HELLO WORLD!",1,1,10,-1);




Hosted for free by InvisionFree