Problems building SDL2.0.2 with mingw because of DXGI.h

I am having problems building recent versions of SDL2 with mingw. The build fails because the DXGI.h header is missing.

This was not an issue with SDL2.0.1 and I can see that this is because of a change in revision 8213 where SDL_DXGIGetOutputInfo was added. The problem remains even if I try to build after configuring with the --disable-render-d3d option.

Do I need to have these headers even if I do not want D3D support? Is it maybe possible to add some configure option where the new features using DXGI is can be excluded. At least this header should be checked for when configuring, right?

This may or may not be good advice, because I honestly don’t know much
about MingW, but the buildbots are successfully compiling this with
MingW-w64 (which, despite its name, provides both 32 and 64 bit
compilers, both of which are used on the Buildbot).

 http://mingw-w64.sourceforge.net/

I can’t remember why, but I tried to install the MingW from
www.mingw.org when I first set up the buildbots, and ended up giving up.

–ryan.On 03/03/2014 03:43 AM, aragn wrote:

I am having problems building recent versions of SDL2 with mingw. The
build fails because the DXGI.h header is missing.

Using MingW-w64 instead of MingW32 is excellent advice, Ryan. The
issue is ? which MingW-w64? There are multiple versions, builds,
etc. And unfortunately, some distribution of the compiler must then
be paired with some distribution of MSYS, and figuring out which one
is non-trivial?

The closest I got was using some alpha version of MSYS with no update
potential whatsoever (rename, reinstall, and copy your home directory
seemed to be the way to upgrade) and two separate installs of the
compiler with path settings determining whether you’d build 32 or 64
bit. And don’t forget to distclean between the two.

Short form: Windows sucks at 32/64 bit and there’s only so much MingW
can do to help make it suck a little less. :slight_smile:

JosephOn Mon, Mar 03, 2014 at 12:12:38PM -0500, Ryan C. Gordon wrote:

On 03/03/2014 03:43 AM, aragn wrote:

I am having problems building recent versions of SDL2 with mingw. The
build fails because the DXGI.h header is missing.

This may or may not be good advice, because I honestly don’t know
much about MingW, but the buildbots are successfully compiling this
with MingW-w64 (which, despite its name, provides both 32 and 64 bit
compilers, both of which are used on the Buildbot).

http://mingw-w64.sourceforge.net/

I can’t remember why, but I tried to install the MingW from
www.mingw.org when I first set up the buildbots, and ended up giving
up.

–ryan.


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

If cross compilation is an option: use mxe. There it is only: make sdl2
Am 03.03.2014 20:56 schrieb “T. Joseph Carter” :

Using MingW-w64 instead of MingW32 is excellent advice, Ryan. The issue
is … which MingW-w64? There are multiple versions, builds, etc. And
unfortunately, some distribution of the compiler must then be paired with
some distribution of MSYS, and figuring out which one is non-trivial…

The closest I got was using some alpha version of MSYS with no update
potential whatsoever (rename, reinstall, and copy your home directory
seemed to be the way to upgrade) and two separate installs of the compiler
with path settings determining whether you’d build 32 or 64 bit. And don’t
forget to distclean between the two.

Short form: Windows sucks at 32/64 bit and there’s only so much MingW can
do to help make it suck a little less. :slight_smile:

Joseph

On Mon, Mar 03, 2014 at 12:12:38PM -0500, Ryan C. Gordon wrote:

On 03/03/2014 03:43 AM, aragn wrote:

I am having problems building recent versions of SDL2 with mingw. The
build fails because the DXGI.h header is missing.

This may or may not be good advice, because I honestly don’t know much
about MingW, but the buildbots are successfully compiling this with
MingW-w64 (which, despite its name, provides both 32 and 64 bit compilers,
both of which are used on the Buildbot).

http://mingw-w64.sourceforge.net/

I can’t remember why, but I tried to install the MingW from www.mingw.orgwhen I first set up the buildbots, and ended up giving up.

–ryan.


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Thanks, I am actually using mingw-w64, prebuilt for Fedora 19. Might be that this is not up-to-date with these headers or that I need to install some add-on to get them.
Still find it a bit strange that these should be required if I compile with just software rendering enabled.

Ryan C. Gordon wrote:> On 03/03/2014 03:43 AM, aragn wrote:

I am having problems building recent versions of SDL2 with mingw. The
build fails because the DXGI.h header is missing.

This may or may not be good advice, because I honestly don’t know much
about MingW, but the buildbots are successfully compiling this with
MingW-w64 (which, despite its name, provides both 32 and 64 bit
compilers, both of which are used on the Buildbot).

http://mingw-w64.sourceforge.net/

I can’t remember why, but I tried to install the MingW from
www.mingw.org when I first set up the buildbots, and ended up giving up.

–ryan.


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

It looks like mingw64 includes dxgi.h not DXGI.h - patched this for mxe

  • but it would be cool to get this upstream.

https://bugzilla.libsdl.org/show_bug.cgi?id=2440

greetings
martinAm 04.03.2014 09:28, schrieb aragn:

Thanks, I am actually using mingw-w64, prebuilt for Fedora 19. Might
be that this is not up-to-date with these headers or that I need to
install some add-on to get them.
Still find it a bit strange that these should be required if I compile
with just software rendering enabled.

http://www.caveproductions.org/


https://twitter.com/MartinGerhardy

It looks like mingw64 includes dxgi.h not DXGI.h - patched this for mxe

  • but it would be cool to get this upstream.

Done, thank you!

–ryan.