Re: [AD] Magic main in Windows

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Evert Glebbeek:
> Yes. In Windows, SDL defines
> #define SDL_main main
> and then calls SDL_main from its own WinMain.
> It can get away with this by requiring that main be declared as
> int main(int argc, int *argv[])
> Any other declaration of main fails.

You mean "char *argv[]", of course.

> Not something we want to do for Allegro IMO. 

Why not? AFAIK, there's only two legal definitions anyway: that one, and the
one without any arguments. From a user's point of view, I think it would be
less of an inconvenience to have to define main() that way, than use the
END_OF_MAIN macro. Heck, most games probably want to support a few command line
options, anyway.

--
Daniel Schlyder
http://bitblaze.com/





Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/