[AD] Magic main in Windows |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
Partially in response to Peter's question about what happens if a Windows
program tries to start with a regular main rather than a winmain function, I
tried the following test program:
#define ALLEGRO_NO_MAGIC_MAIN
#include <allegro.h>
int main(void)
{
allegro_init();
install_keyboard();
set_gfx_mode(GFX_AUTODETECT_WINDOWED, 320, 200, 0, 0);
readkey();
return 0;
}
Tested under Windows 98 with a year-old MinGW (gcc 3.2.3) and Allegro 4.1.12,
this program compiles without warnings and runs as would be expected, both from
a terminal and from the file manager, rather to my surprise.
So why exactly do we need END_OF_MAIN() in Windows?
If it turns out that we can do without it, then I say we throw it out...
Evert