Re: [AD] Preparing for 4.9.9 |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
- To: Coordination of admins/developers of the game programming library Allegro <alleg-developers@xxxxxxxxxx>
- Subject: Re: [AD] Preparing for 4.9.9
- From: Evert Glebbeek <eglebbk@xxxxxxxxxx>
- Date: Tue, 10 Mar 2009 10:30:39 -0700
On 10 mrt 2009, at 10:22, Elias Pschernig wrote:
However, some testing with the mingw cross-compiler reveals that it is
only working under Windows with static linking. With SHARED enabled in
cmake, gcc complains about not finding al_main while creating the DLL.
I thought the point was that we wanted the magic main to be in a
static library anyway?
Besides (as I said), there is a patch (on the mailing list somewhere)
that makes it possible to use main() instead of WinMain() on Windows.
IIRC, no special code is needed for MinGW, and MSVC requires a #pragma.
Also, the trick to allow "int main(void)" does not work for C++ as the
prototype has to be declared with extern "C", and C++ does not allow
inexact prototypes as C does.
Ah, maybe C++ was the reason. But I'm not sure I understand: we simply
#define main al_main, then have the "extern void al_main(int, char
**);" in our own (C) source file - so the C++ compiler would not see
this at all?
(I didn't look at your attached patch to verify any of this).
Evert