On 27.04.2015 20:37, Christer Solskogen wrote:
> Hi!
> 
> I've got trouble cross compiling SDL2 with the latest and greatest gcc, 
> binutils and mingw-w64.
> 
> gcc version 5.1.0 (GCC)
> GNU ld (GNU Binutils) 2.25
> and mingw-w64 v4.x (from git)
> 
> I don't what is to blame. But I'm pretty sure the cross compiler it self 
> is in good shape, since I can cross compile SDL1 without any issues.
> 
> This is what SDL2 gives me:
> 
>    CC     build/SDL_render_d3d11.lo
> /home/solskogen/mingw-w64-builder/trunk/lib/sdl2/src/render/direct3d11/SDL_render_d3d11.c:140:19:
>  
> error: static declaration of 'IID_IDXGIFactory2' follows non-static 
> declaration
>   static const GUID IID_IDXGIFactory2 = { 0x50c83a1c, 0xe072, 0x4c48, { 
> 0x87, 0xb0, 0x36, 0x30, 0xfa, 0x36, 0xa6, 0xd0 } };
>                     ^
> In file included from 
> /tmp/obj/cross-mingw-w64/x86_64-w64-mingw32/include/combaseapi.h:156:0,
>                   from 
> /tmp/obj/cross-mingw-w64/x86_64-w64-mingw32/include/objbase.h:14,
>                   from 
> /tmp/obj/cross-mingw-w64/x86_64-w64-mingw32/include/ole2.h:17,
>                   from 
> /tmp/obj/cross-mingw-w64/x86_64-w64-mingw32/include/d3d11_1.h:12,
>                   from 
> /home/solskogen/mingw-w64-builder/trunk/lib/sdl2/src/render/direct3d11/SDL_render_d3d11.c:34:
> /tmp/obj/cross-mingw-w64/x86_64-w64-mingw32/include/dxgi1_2.h:759:1: 
> note: previous declaration of 'IID_IDXGIFactory2' was here
>   DEFINE_GUID(IID_IDXGIFactory2, 0x50c83a1c, 0xe072, 0x4c48, 0x87,0xb0, 
> 0x36,0x30,0xfa,0x36,0xa6,0xd0);
>   ^

At a glance it looks like SDL_render_d3d11.c declares and defines
IID_IDXGIFactory2, and mingw's dxgi1_2.h declares IID_IDXGIFactory2 as well
(and defines it in some library, likely libuuid.a).

Apparently, SDL2 was written against a SDK (likely mingw.org) that has no
IID_IDXGIFactory2.

The fix is to remove
static const GUID IID_IDXGIFactory2 = { 0x50c83a1c, 0xe072, 0x4c48, { 0x87,
0xb0, 0x36, 0x30, 0xfa, 0x36, 0xa6, 0xd0 } };
from SDL2 (or at least ifdef it out based on some macro from dxgi1_2.h).

At a glance, anyway.

-- 
O< ascii ribbon - stop html email! - www.asciiribbon.org

Attachment: 0x922360B0.asc
Description: application/pgp-keys

Attachment: signature.asc
Description: OpenPGP digital signature

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to