Re: [AD] No need for END_OF_MAIN (Windows) |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
On 2005-05-14, Michal Molhanec <michal@xxxxxxxxxx> wrote:
> Peter Wang wrote:
> >>It would be good if Allegro could be a normal library, and the
> >>mangling code was in some header file that only full featured C
> >>programs required, or could implement manually if desired.
> >
> >
> >And then we should move any special main() or equivalents into a
> >separate library.
>
> do you mean something like SDL_main is? that would be beginners killer
> much worse than END_OF_MAIN()
I mean that liballeg.so should not be referencing missing symbols that
have to be supplied by the user. It's a pain to load liballeg.so
dynamically if you have to provide a _mangled_main to be resolved.
Moving the definition of main()/WinMain() to, say, a libalmain.a would
get rid of this missing reference, at the cost requiring most users to
have to link with -lalleg -lalmain instead of -lalleg (IMHO not a big
deal, and we will probably need to break the build system post-4.2
anyway in order to allow 4.2 and later versions of the library to be
installed simultaneously).
Peter