Closed StephanTLavavej closed 7 years ago
It's a good idea to keep an eye on upcoming mingw-w64 5.0 release which have a lot of D3D fixes.
Cool, I'll remember to check the status of this when 5.0 comes out.
Still repros with mingw-w64 4.0.6 and SDL 2.0.4:
../src/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 c:\mingw\x86_64-w64-mingw32\include\combaseapi.h:156:0,
from c:\mingw\x86_64-w64-mingw32\include\objbase.h:14,
from c:\mingw\x86_64-w64-mingw32\include\ole2.h:17,
from c:\mingw\x86_64-w64-mingw32\include\d3d11_1.h:12,
from ../src/src/render/direct3d11/SDL_render_d3d11.c:34:
c:\mingw\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);
^
Well seems to be because SDL is assuming mingw-w64 doesn't have that const. Just removing the const from SDL source should work.
It's entirely possible that this is a bug on SDL's side. I don't really have the time to investigate (I don't need D3D, and the switch lets me build), but if someone wants to investigate and report it to the proper upstream maintainers, that would be awesome.
Still an issue with MinGW64 6.1.0 Disabling RENDER_D3D helps, but what if its needed?
I don't use SDL's D3D machinery (just windowing), so this doesn't actually affect me. I just want my build process to be a little simpler.
Fixed with mingw-w64 5.0.0 and SDL 2.0.5.
When I upgraded mingw-w64 from 3.3.0 to 4.0.2, I had to add
--disable-render-d3d
to SDL's build. Apparently, mingw-w64 contains some-but-not-all D3D machinery, causing SDL'sconfigure
to detect its presence, but the following build fails.mingw-w64 should fully support this, whatever it is.