as i said i'm trying to compile a simple program that uses allegro, it's a small thing, indeed my goal was just to start using allegro, but until now i'm unable even to compile my simple program.
that's the program (i named it alle.c):
Expand|Select|Wrap|Line Numbers
- #include <stdio.h>
- #include <stdlib.h>
- #include <allegro.h>
- #define MAX_X 800
- #define MAX_Y 600
- #define V_MAX_X 0
- #define V_MAX_Y 0
- #define COLOR_BITS 8
- int inicia(void);
- void principal(void);
- void finaliza(void);
- int main (void)
- {
- if (!inicia())
- {
- finaliza();
- return -1;
- }
- principal();
- finaliza();
- return 0;
- }
- END_OF_MAIN();
- int inicia (void)
- {
- allegro_init();
- install_keyboard();
- set_color_depth(COLOR_BITS);
- if (set_gfx_mode(GFX_AUTODETECT, MAX_X, MAX_Y, V_MAX_X, V_MAX_Y) < 0)
- {
- printf("Erro ao inicializar o modo grafico.\n");
- return (FALSE);
- }
- set_palette(desktop_palette);
- return (TRUE);
- }
- void principal (void)
- {
- }
- void finaliza (void)
- {
- allegro_exit();
- }
gcc -I/usr/include/ -o jogo alle.c -Wall -lalleg
but i received that error message:
/usr/bin/ld: cannot find -lalleg
I suspect that the error concerns to a missing library, but i'm not sure.
Can you confirm me that it was in fact a missing library and, if that's the case, wich library should i install, because i have no idea about what it is?
thanks