allegro error

hey everyone, i've just started programming allegro on the dev-cpp. have encountered a problem. the following compile log will show it:

Compiler: Default compiler
Building Makefile: "C:\Dev-Cpp\Makefile.win"
Executing make...
make.exe -f "C:\Dev-Cpp\Makefile.win" all
g++.exe X:/game/hello.o 2.o -o "pickinsticks.exe" -L"C:/Dev-Cpp/lib" -lalleg

2.o(.text+0x0):2.cpp: multiple definition of `_mangled_main(int, char**)'
X:/game/hello.o(.text+0x0):hello.cpp: first defined here
2.o(.text+0xe4):2.cpp: multiple definition of `WinMain@16'
X:/game/hello.o(.text+0x68):hello.cpp: first defined here
/mingw/lib/crt2.o(.text+0x28):crt1.c: undefined reference to `__dyn_tls_init_callback'
/mingw/lib/crt2.o(.text+0x5c):crt1.c: undefined reference to `__cpu_features_init'
collect2: ld returned 1 exit status

make.exe: *** [pickinsticks.exe] Error 1

Execution terminated
i've just started programming allegro on the dev-cpp.


Well There's your problem =] jkjk

Code? I think I know what's going on here, however a little more info would be great.
#include<allegro.h>

int main(int argc, char* argv[])
{
allegro_init();
install_keyboard();

set_color_depth(16);
set_gfx_mode(GFX_AUTODETECT,640,480,0,0);

BITMAP *pic = NULL;
pic = load_bitmap("picture.bmp",NULL);
blit(pic,screen,0,0,0,0,480,360);
readkey();

destroy_bitmap(pic);
return 0;
}
END_OF_MAIN();
And if anyone can guide how to attach graphics.h with dev cpp....it would be great :)
Topic archived. No new replies allowed.