Author Topic: Working: DirectX9.0b with CB Nightly Build + MinGW + GCC 3.4.5  (Read 5491 times)

MB

  • Guest
There seems to be a lot of questions in this forum about how to make DirectX work with CB and GCC. I have managed to build a fairly large DirectX project with:

CB Nightly Build (10th Jul 06)
GCC 3.4.5 (MinGW)
DirectX9.0b (straight from Microsoft)


using DirectGraphics, DirectInput and DirectSound. Everything works fine but there were a few problems:

One problem was that when linking, mingw32-g++.exe refused to find the .dll files no matter what I tried. I put the correct path into "Global compiler settings->Directories->Linker" and it didn't work. I copied the .lib files to a nearby folder (../lib), used that path instead and it still didn't work. I finally copied the .lib files into the actual project folder and then mingw32-g++.exe managed to find the files. So there is a work around but it is obviously not ideal. I did a search for this problem in this forum but didn't find anything that seems to match/solve it. If this is already a known/fixed issue please let me know.

Another problem was GUID_NULL. For some reason this is needed for GCC but not for WinC++. A simple workaround is:

GUID nullGuid;
memset(&nullGuid, 0, sizeof(nullGuid));
... = nullGuid;              // intead of GUID_NULL


But other than that everything works. Just posting this in case it is helpful to somebody.