Re: [AD] [ alleg-Bugs-2703105 ] remove END_OF_MAIN

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


On 22 Jan 2010, at 20:51 , Elias Pschernig wrote:
> I might try and see if I can create the DLLs with a mingw cross-compiler
> sometime today or tomorrow (with SDL-like macros instead of END_OF_MAIN)
> - but I won't be able to do anything with VC++ or in OSX.

From what I remember, MinGW doesn't actually require a magic main, as long as you tell it to compile a GUI application (which you should anyway) and for MSVC you can set a #pragma that amounts to the same thing.
That would cover Windows, which leaves OS X as the only platform for which we actually need to do something special. I'll do something similar to SDL for that, moving Allegro's magic main into an addon (allegro-main or something like that), which seems to me to be the cleanest way to do this in the Allegro 5 framework. We can, of course, do the same for MSVC if we don't want to rely on #pragma's.
For consistency across platforms, I'll make dummy allegro-main libraries for Windows and Linux so we can just tell people to "use int main(int, char**) and link with allegro-main and things will work on all platforms". That said, someone should make sure that the GP2 and iPhone ports continue to work.

Speaking of which, are those target platforms for 5.0 as well? They might as well be if the ports are complete and stable.

Evert



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