Sign in to follow this  
esrix

CodeBlocks winmain@16 error for Allegro

Recommended Posts

esrix    184
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this