How to compile a DirectX 11 app in MinGW
Asked Answered
E

2

12

I've looked, and I can't find any material relating to using Direct3d 10 or 11 with MinGW. What do I have to do to get things working? I'm getting errors in the header files supplied by the DX SDK.

And don't anyone even think of suggesting Visual Studio.

Electrophone answered 25/1, 2012 at 9:40 Comment(0)
J
6

It seems that here it is explained how to get DX headers from SDK work with MinGW: http://d.hatena.ne.jp/tbk/20110115/1295080728 Use Google Translate to translate page to english.

Alternatively try using DirectX headers from mingw64 project from here: http://sourceforge.net/projects/mingw-w64/files/ You'll need "Download headers and CRT source v2.0.1 (r4623) (7.0 MB)". Or you can check out them directly from svn: https://mingw-w64.svn.sourceforge.net/svnroot/mingw-w64/trunk/mingw-w64-headers/

Junie answered 25/1, 2012 at 17:5 Comment(3)
I gave the suggestion from the Japanese site a try and also from another site I found (since I needed IID numbers) and managed to compile a simply hello world DX11 program. Unfortunately it only seems to work for 32-bit. A 64-bit compile crashes. Also, I'm already using the latest version of MinGW-w64, and I had no luck with the DX11 headers included with it. I get errors due to to things like ID3D11Device not being defined etc.Electrophone
@Electrophone did you link with the 64 bit directx library?Zeitgeist
web.archive.org/web/20081206035317/http://www.emmestech.com/… is the first link in English (had to use Wayback Machine).Tarrel

© 2022 - 2024 — McMap. All rights reserved.