Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have downloaded the latest Mingw toolchain from, but it seems DirectX headers are missing. Where can I get those?

I assume there are open source compatibility headers out there, in particular for ddraw.h, which is deprecated by Microsoft.

share|improve this question
Is there any reason why you are using Mingw instead of Visual Studio Express editions? You'll be able to get a lot more help and support that way, and most would agree that it's by far the best free IDE for Windows. – Peter Alexander Jan 2 '11 at 21:51
Issues of IDE bigotry aside, it is an uphill battle to compile a "platform" library with something other than the standard platform compiler (compare trying to compile a Linux kernel module with ICC rather than GCC). At best you can hope for stuff from WINE and other interop projects, because Microsoft has zero interest in supporting your compiler configuration. – user744 Jan 2 '11 at 23:16
That's odd, I have directX headers in my MinGW, and I don't remember adding them separately. Granted, my MinGW install is quite old, but when and why would they stop supplying those headers? – Luker Jan 3 '11 at 6:22
I am interested in a very small subset of all the available DirectX methods, so I think any compiler will be fine. I also use LoadLibrary() and GetProcAdress() whenever I can, it helps. – Prof. Falken Jan 3 '11 at 9:14
@DarioOO, that was, what four years ago? I don't even remember clearly what I was up to. :) – Prof. Falken Jan 23 '15 at 19:17
up vote 1 down vote accepted

The MAME development site recommends using these headers from WINE; the particular zip they link is from a year ago, so you may be able to extract more recent (and presumably, somehow better) headers from WINE itself.

share|improve this answer
It seems the Mame site has something to avoid deep linking, so first click the Mame site before you try to download the headers. – Prof. Falken Jan 3 '11 at 9:16

Are you sure you have installed mingw's dist of the win32 api? I do believe the dx headers are part of that package. Do note that dx9 is the latest dx version available with mingw and that it is not complete (if you're hoping to use d3d, however, you should be good to go).

share|improve this answer

You won't find ddraw in this one, but google dx9mgw for the directx 9 ones. Then, when you build your release, be sure to disable strict aliasing by either not doing speed optimization above -0 or -1 or by disabling strict aliasing optimizations with a compiler directive. Or I guess update the headers if you want to.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.