RE: [AD] Magic main in Windows

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


main() may have more than 2 parameters. This is allowed by the standard.
However, if main() has some parameters, then the first two must be (int,
char **).



> -----Original Message-----
> From: alleg-developers-admin@xxxxxxxxxx [mailto:alleg-
> developers-admin@xxxxxxxxxx] On Behalf Of Daniel Schlyder
> Sent: Sunday, August 01, 2004 3:00 PM
> To: alleg-developers@xxxxxxxxxx
> Subject: Re: [AD] Magic main in Windows
> 
> 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/
> 
> 
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by OSTG. Have you noticed the changes
on
> Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
> one more big change to announce. We are now OSTG- Open Source
Technology
> Group. Come see the changes on the new OSTG site. www.ostg.com
> --
> https://lists.sourceforge.net/lists/listinfo/alleg-developers




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