Re: [AD] alternate entry point for allegro programs

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


Evert Glebbeek wrote:

As far as I know, Allegro's magic main in Windows is just to turn main into WinMain. This is needed to make programs cross-platform, as Windows requires the non-portable WinMain function instead of the standard main function.

Does anybody know what happens if a program contains both main() and WinMain()?

In UNIX, all Allegro's main does is grab a copy of argv[0] to get the path to the executable.

There are other ways of getting the path, albeit probably less portable. Grabbing argv is too trivial a reason to hijack the definition of main.

Peter





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