Re: [AD] Borland, C++ and Allegro

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


> It looks like Borland doesn't like to include standard headers with the
> extern "C" qualifier.

Yes, we shouldn't have put #include directives within the range of the
extern "C" qualifier in the first place. This must be fixed in all header
files, but that's too broad a change a few days before a release, even
a WIP release.

The workaround is the following one:

min.cpp:
#include <errno.h>
#include <limits.h>
#include <stdarg.h>
#include <stddef.h>
#include <stdlib.h>
#include <time.h>

#include <allegro.h>

int main(void)
{
   allegro_init();
   return 0;
}
END_OF_MAIN()


However, there is still a problem because WinMain() must have C linkage and
it currently hasn't...<sigh>... the attached patch fixes the problem. BUT
it also modifies the WinMain() linkage for MSVC too, so I'd would like you
to test it (use the min.cpp C++ program above for example).

--
Eric Botcazou

Attachment: alwin.diff
Description: Binary data



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