Nuticulus
June 26th, 2009, 11:17 PM
Hi,
I'm trying to set up Allegro with codeblocks. I have put `allegro-config --libs --static` in the linker settings, and have the following c++ code:
#include <allegro.h>
int main()
{
//Initialize Allegro
allegro_init();
//Set the resolution to 640 x 480 with SAFE autodetection.
set_gfx_mode(GFX_SAFE, 640, 480, 0, 0);
//Install the keyboard handler
install_keyboard();
//Print your welcome message to the screen
textout(screen, font, "Hello Dream.In.Code! This is my first Allegro Program", 1, 1, 10);
textout(screen, font, "Press ESCape to quit.", 1, 12, 11);
//Loop until escape is pressed
while(! key[KEY_ESC])
poll_keyboard();
//Exit program
allegro_exit();
return 0;
}
END_OF_MAIN();
When I compile, I get the following error:
ld - cannot find -l-L/usr/lib -Wl,-Bsymbolic-functions -lalleg -lm -lXxf86vm -lXcursor -lXpm -lXext -lX11 -lpthread -ldl
Anyone know what's wrong?
I'm trying to set up Allegro with codeblocks. I have put `allegro-config --libs --static` in the linker settings, and have the following c++ code:
#include <allegro.h>
int main()
{
//Initialize Allegro
allegro_init();
//Set the resolution to 640 x 480 with SAFE autodetection.
set_gfx_mode(GFX_SAFE, 640, 480, 0, 0);
//Install the keyboard handler
install_keyboard();
//Print your welcome message to the screen
textout(screen, font, "Hello Dream.In.Code! This is my first Allegro Program", 1, 1, 10);
textout(screen, font, "Press ESCape to quit.", 1, 12, 11);
//Loop until escape is pressed
while(! key[KEY_ESC])
poll_keyboard();
//Exit program
allegro_exit();
return 0;
}
END_OF_MAIN();
When I compile, I get the following error:
ld - cannot find -l-L/usr/lib -Wl,-Bsymbolic-functions -lalleg -lm -lXxf86vm -lXcursor -lXpm -lXext -lX11 -lpthread -ldl
Anyone know what's wrong?