Re: [AD] Proposal for new magic main

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


> Looks good, but still one minor thing: we need to document how to use
> another entry point in a portable way. As long as the magic-main in
> windows is not used to do any intialisation it should be ok to use
> different entry points, but IMHO this behaviour should be guaranteed in
> the API.

I agree.

> So I propose the following text for the docs:
>
> ==
> If you want to use Allegro in combination with another lib which defines
> it's own entrypoint, you'll have to disable Allegro's main mangling by
> defining ALLEGRO_NO_MAGIC_MAIN before including allegro.h.
> ==

The Windows specifics section already contains a blurb about this
ALLEGRO_NO_MAGIC_MAIN but, for the sake of portability, it should indeed be
moved to the general section.

> This would mean the magic-main would never be allowed to do any
> intialisation stuff, and would only be there to give those poor Windows
> programmers an ANSI environment ;-)

Exactly. The magic main was never intended to do something else I think.

--
Eric Botcazou
ebotcazou@xxxxxxxxxx



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