I have been trying to make a WIN32 Application with a GUI (NOT a simple console application) on VS2012, and I'm stuck with this one error. My project is on Release configuration. My main function looks like this:
int CALLBACK WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPSTR lpCmdLine, int nCmdShow)
{
return DialogBox(hInstance, MAKEINTRESOURCE(IDD_MAIN), NULL, DlgProc);
}
What I've tried:
1) Creating a new WIN32 Project with these settings:
2) Changing between Unicode and Multi-Byte Character Sets
3) Changing the SubSystem (from Windows (/SUBSYSTEM:WINDOWS) to Not Set)
4) Adding entry points (main ; _main ; WinMain)
5) Adding #undef _ATL_MIN_CRT (I'm pretty sure it was disabled anyway, but still did it for extra insurance...)
NONE of these solved my issue. I've searched the Internet and haven't found anyone with a similar problem (creating a WIN32 Application) who has solved their issue.
EDIT: I'm also using Allegro 5 library and I'm building the program with /MT .
Any recommendations are welcome.
After some searching I've found the answer.
All I needed to do was to define ALLEGRO_NO_MAGIC_MAIN .