• Advertisement
Sign in to follow this  

CodeBlocks winmain@16 error for Allegro

This topic is 4106 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
Advertisement
Sign in to follow this  

  • Advertisement