Jump to content
  • Advertisement
Sign in to follow this  
Om3gA

Newbie cant compile Allegro files

This topic is 2501 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello guys!

Well I bought a Game programming book which uses the C language and Allegro. Im studying programming in uni right now, im fairly familiar with C/Java/C++.
I cant get this simple "Hello World!" program to work, I get a few compile errors, that I cant quite figure out. I have done everything the book says, yet I cant get it to work. Im using Dev-C++, that might be it, Im not sure. Ive tried installing allegro in 2 different ways, 1 being how the book explained, and the other one is by the tools tab in dev-c++ -> update -> download it lol.

#include<allegro.h>
int main(void)
{
allegro_init();
set_gfx_mode(GFX_SAFE, 640, 480, 0, 0);
install_keyboard();
textout_ex(screen, font,"Hello World!",1, 1, 10, -1);
while(!key[KEY_ESC]);
allegro_exit();
return 0;
}




Thats the hello world, and here are the compile errors im getting:
.drectve `-aligncomm:"___DTOR_LIST__",2 ' unrecognized
.drectve `-aligncomm:"___CTOR_LIST__",2' unrecognized
[Linker error] undefined reference to `WinMain@16'
ld returned 1 exit status
C:\Users\Ali\Desktop\testing\Makefile.win [Build Error] [Project1.exe] Error 1

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!