Re: [AD] END_OF_MAIN, again

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


On 7/30/05, chris.kcat@xxxxxxxxxx <chris.kcat@xxxxxxxxxx> wrote:
As for your WinMain solution, does this allow the user to override it and make
their own WinMain? And your warning may be from not using the dllexport or
dllimport tags (I forget the exact syntax).

Are those needed (remember, I'm adding non-dll code into import library).
If user wants his own WinMain he has to define ALLEGRO_NO_MAGIC_MAIN and provide his own WinMain and linker will skip allegro's one. 

And I think I see a potential problem. It's bad form to use double-underscores
for the beginning of a name.. those are reserved for the compiler (however
unlikely it'll use that name). I'd recommend changing it to something else
that starts with a single underscore.

Also, your changes make install_allegro called from inside the library.
install_allegro itself is supposed to be inlined so the program can check the
Allegro version it was compiled with against the library's version. You could
avoid this by using _install_allegro instead of install_allegro. You can even
change install_allegro to call _install_allegro_wrapper directly, without the
need for the define override.


Sounds good, but you'll have to wait till tomorrow since I'm to tired to try it now.



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