c++cmakesdlbiicode

fatal error: dxgi.h: No such file or directory. Building SDL 2 with biicode


I'm using biicode 3.3 with Miguel's v5 SDL2. https://www.biicode.com/miguel/sdl2

I'm using Windows 7 Mingw32 to compile SDL2 dependencies. But the SDL build falls on it's face when it cant find dxgi.h. I noticed at one point this was a reported problem, because of the caps, but has been fixed now.

I've also installed DirectX 9 SDK, Windows 7 SDK and Windows 8 SDK. How can I tell biicode/cmake where to find the Windows SDK header files when it attempts to build SDL for my project? I noticed the "dxgi.h" is located in the Windows 8 SDK, but biicode or mingw doesn't know it exist. So I'm still running into the

C:\MyProject\bii\deps\miguel\sdl2\src\video\windows\SDL_windowsvideo.c:250:18: fatal error: dxgi.h: No such file or directory
 #include <dxgi.h>

Solution

  • SDl2 since 2.0.2 do not support mingw32. There is no any advantage of using MinGW32 instead mingw-w64. So probably the best way to solve the sdl2 compilation issue is to upgrade mingw.

    At biicode you'll find older versions of sdl2 (2.0.1) that do not make use of dxgi directly.

    The Mingw64 works on Windows 32 as in 64