invinciblegod
Member
- Joined
- Oct 18, 2005
- Messages
- 158
I am doing this Tutorial. I inputed it but i get the following errors. I don't know what's wrong. Please help. I don't know what those mean.
C:\Dev-Cpp\Projects\Allegro_Intro\AllegroIntro.cpp In function `int _mangled_main()':
17 C:\Dev-Cpp\Projects\Allegro_Intro\AllegroIntro.cpp [Warning] `textout_centre' is deprecated (declared at C:/Dev-Cpp/include/allegro/alcompat.h:160)
[Linker error] undefined reference to `WinMain@16'
17 C:\Dev-Cpp\Projects\Allegro_Intro\AllegroIntro.cpp ld returned 1 exit status
C:\Dev-Cpp\Projects\Makefile.win [Build Error] [Project1.exe] Error 1
What I Typed:
#include <allegro.h>
#include "tutorial.h"
DATAFILE* data;
int main()
{
allegro_init();
install_keyboard();
data=load_datafile("tutorial.dat");
set_gfx_mode(GFX_AUTODETECT,320,200,0,0);
set_palette((RGB*)data[TUT_GAMEPAL].dat);
textout_centre(screen,font,"Ready. Beep.",160,100,255);
readkey();
return 0;
}
On a side note, if someone believes there is something easier to code in for newbies (newbie meaning knows how to code basic C++ with iostream and stuff), tell me. I don't know anything about sdl and allegro.
C:\Dev-Cpp\Projects\Allegro_Intro\AllegroIntro.cpp In function `int _mangled_main()':
17 C:\Dev-Cpp\Projects\Allegro_Intro\AllegroIntro.cpp [Warning] `textout_centre' is deprecated (declared at C:/Dev-Cpp/include/allegro/alcompat.h:160)
[Linker error] undefined reference to `WinMain@16'
17 C:\Dev-Cpp\Projects\Allegro_Intro\AllegroIntro.cpp ld returned 1 exit status
C:\Dev-Cpp\Projects\Makefile.win [Build Error] [Project1.exe] Error 1
What I Typed:
#include <allegro.h>
#include "tutorial.h"
DATAFILE* data;
int main()
{
allegro_init();
install_keyboard();
data=load_datafile("tutorial.dat");
set_gfx_mode(GFX_AUTODETECT,320,200,0,0);
set_palette((RGB*)data[TUT_GAMEPAL].dat);
textout_centre(screen,font,"Ready. Beep.",160,100,255);
readkey();
return 0;
}
On a side note, if someone believes there is something easier to code in for newbies (newbie meaning knows how to code basic C++ with iostream and stuff), tell me. I don't know anything about sdl and allegro.