Jump to content
  • Advertisement
Sign in to follow this  

CodeBlocks winmain@16 error for Allegro

This topic is 4249 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

I'm trying to migrate from DevC++ to CodeBlocks and using Allegro for my game. I started a new console application and this is what it gave me (which works): #include <iostream> int main() { std::cout << "Hello world!" << std::endl; return 0; } But the moment I modified it and add the allegro header, like so: #include <iostream> #include <allegro.h> int main(int argc, char *argv[]) { std::cout << "Hello world!" << std::endl; return 0; } It gives me this error: C:\Program Files\CodeBlocks\lib/libmingw32.a(main.o):main.c:(.text+0x106): undefined reference to `WinMain@16' I've looked at other template examples and messed with the compiler and project options, but nothing seems to work. If I comment out the allegro header, it works.

Share this post

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

  • Advertisement

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!