Re: [AD] Allegro 4.0.3rc1+ MFC, bug?

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


> Compiling...
> AlFunc.cpp
> C:\Programa\VStudio\VC98\INCLUDE\winbase.h(1080) : error C2731: 'WinMain'
> : function cannot be overloaded
>         C:\Programa\VStudio\VC98\INCLUDE\winbase.h(1075) : see declaration
> of 'WinMain'
> C:\Programa\VStudio\VC98\INCLUDE\winbase.h(1080) : error C2733: second C
> linkage of overloaded function 'WinMain' not allowed
>         C:\Programa\VStudio\VC98\INCLUDE\winbase.h(1075) : see declaration
> of 'WinMain'
> ----
>
> This program used to compile with previous Allegro versions (4.0.x). In
> fact I still have the executable, and it's linked against Allegro 4.0.x
> dll, working if I use 4.0.3 dll.

We changed the linkage of our internal WinMain() function, from a C++ linkage 
to a C linkage. No problem was detected by the time the change was made.

> I post it at allegro.cc and one of the answers I get is that I should
> define ALLEGRO_NO_MAGIC_MAIN. I tried it, and it compiles! Which is funny,
> because this wasn't needed before, breaking forward API compativility.

I presume that you explicitly define a WinMain() function in your program, 
don't you? If so, with which linkage?

-- 
Eric Botcazou




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