Dev-C++ allegro compiler

i copy simple code from a tutorial web site into Dev-C++ and when i compiled it, it came up with several errors, it included allegro.h .

this shouldnt be happening and i did load the lip_allergo.a

i redownloaded from a different site and switched the files and it did the same thing so the file isnt corrupted.

any ideas on how to fix this?
You know you have to link to -lallegro. Somewhere in the options this should be done.

If you still have problems, please give us a code and a compile log.
Yeah i already linked it

heres the code i copyed into it

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include <allegro.h>


int main(){
 
    allegro_init();
    install_keyboard();
    set_gfx_mode( GFX_AUTODETECT, 640, 480, 0, 0);
    
    readkey();
    
    return 0;
    
}   
END_OF_MAIN(); 



and heres the compile log


Compiler: Default compiler
Building Makefile: "C:\Documents and Settings\Deborah\Desktop\Makefile.win"
Executing make...
make.exe -f "C:\Documents and Settings\Deborah\Desktop\Makefile.win" all
g++.exe -c C++/main.cpp -o C++/main.o -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include" -I"C:/Dev-Cpp/include/c++/3.4.2/backward" -I"C:/Dev-Cpp/include/c++/3.4.2/mingw32" -I"C:/Dev-Cpp/include/c++/3.4.2" -I"C:/Dev-Cpp/include"

In file included from C:/Dev-Cpp/include/allegro.h:39,
from C++/main.cpp:1:
C:/Dev-Cpp/include/allegro/color.h: In function `int main()':
C:/Dev-Cpp/include/allegro/color.h:13: error: `load_bitmap' undeclared (first use this function)

C:/Dev-Cpp/include/allegro/color.h:13: error: (Each undeclared identifier is reported only once for each function it appears in.)
C:/Dev-Cpp/include/allegro/color.h:19: error: `makecol' undeclared (first use this function)
C:/Dev-Cpp/include/allegro/color.h:19: error: `line' undeclared (first use this function)
C:/Dev-Cpp/include/allegro/color.h:24: error: `draw_sprite' undeclared (first use this function)

In file included from C:/Dev-Cpp/include/allegro/draw.h:66,
from C:/Dev-Cpp/include/allegro.h:40,
from C++/main.cpp:1:
C:/Dev-Cpp/include/allegro/inline/draw.inl: At global scope:
C:/Dev-Cpp/include/allegro/inline/draw.inl:72: error: `void line(BITMAP*, int, int, int, int, int)' used prior to declaration

C:/Dev-Cpp/include/allegro/inline/draw.inl:238: error: `void draw_sprite(BITMAP*, BITMAP*, int, int)' used prior to declaration

In file included from C:/Dev-Cpp/include/allegro.h:54,
from C++/main.cpp:1:
C:/Dev-Cpp/include/allegro/datafile.h:91: error: `BITMAP* load_bitmap(const char*, RGB*)' used prior to declaration

make.exe: *** [C++/main.o] Error 1

Execution terminated
Topic archived. No new replies allowed.