MINGW32 AND DIRECT X

The original header files seems to work so the only problem is to update the lib files that means creating one static and some import libraries. Here is how I did it for directx 7 and how you can update it for common versions.

1. Copy all DEFINE_GUID definitions from the directx header files to dxguid.c this will become a static library and replace dxguid.lib from Microsoft. In dxguid.c should also the constants from dinput.h be defined.

2. Create the import libs I tried to let reimp do this but it did not work all the way but running reimp -s > file.def gave me the symbols with parameter size. You will need to edit the def files slightly with an EXPORTS on top and perhaps deleting irrelevant garbage.

3. I created a makefile this file must perhaps be updated in the future.

4. Run make and place the libs in the compiler lib directory.

As far as I know do mingw32 support all of directx in both C and C++ with full COM support. My libs can of course miss a lot and the data for the new Mouse2 is probably wrong since I took it after some inspecting of dinput.lib with a dump tool. :-)
Some comments about using directx with mingw32:

OK, enough of advises here is the  dxlibs  you must get the headers from Microsoft.

 Microsoft SDK for directx  (the full SDK is recommended but you only need to download the headers)
 MS SDK examples   (and here is some simple  makefiles  I have done for some of the examples)
 Peter Hawkins original dirext 5.0 port  (my directx work is based on his port but the limitations is history)
 John Fortins 6.0 port with the donuts example  (use  this makefile  instead if you want to compile the donuts example on his page)

If you are interested in directx programming do I think that it would be great if you created a page with info and makefiles for the SDK examples with mingw32. That could certainly help a lot of people!

 back to main page