WinMain@16 error, please help.

Hello, im using Code::Blocks with MinGW, when i compiled the example.cpp and testbed and all, it went fine.
Now im trying to compile the example.cpp using allegro and box2d, but when i include allegro.h it gives an error:

"E:\Program\MinGW\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\libmingw32.a(main.o):main.c:(.text+0x104)||undefined reference to `WinMain@16'|"

Im pretty new with c++ so i only know the basics, but ive never seen that error before, any suggestions on what might be wrong and how to fix it?

EDIT: NVM, found the problem, I was clumsy enough for forget the "END_OF_MAIN();" that allegro uses after main.

Original thread: https://box2d.org/forum/viewtopic.php?t=3477