| Compiling SDL 2.0 with MinGW |
|
chrismile
|
Hello,
I tried to compile the latest SDL 2.0 snapshot with MinGW on Windowns 8. However, I'm having some problems with this. When I first built SDL 2.0, I got an error saying that it wasn't built with force feedback support when running my program with it. So I thought that I probably needed some DirectX headers for it to work correctly (and of course to get the better dsound backend). Thus I copied the DirectX development headers and libraries from http://www.libsdl.org/extras/win32/mingw32/README.txt . But then I got an error message saying that the file "wbemcli.h" was missing. I copied this header and "xinput.h" from the mingw-w64 project, but the headers don't seem to be compatible as I get a lot of error messages like this one: c:\mingw\bin\../lib/gcc/mingw32/4.7.2/../../../../include/wbemcli.h:499:80: error: unknown type name 'VARIANT' Do you know how I could solve these problems or do I have to use the MinGW version from mingw-w64 instead? Thank you for your answers in advance! |
|||||||||||
|
|
||||||||||||
| Compiling SDL 2.0 with MinGW |
|
Nathaniel J Fries
|
To compile using normal MinGW (I'm only just now experimenting with MinGW-W64 right now), you only need a few files, which can be ripped from wine and patched slightly to work (in fact, this is basically what MinGW-W64 did).
Perhaps the Visual C++ headers include oaidl.h while the MinGW-W64 ones do not, causing SDL to have this error. oaidl.h defines the VARIANT type. Including this before the offending header should do the trick. |
|||||||||||
|
|
||||||||||||
| Compiling SDL 2.0 with MinGW |
|
chrismile
|
I managed to compile SDL, SDL_image, ... with mingw-w64 and the libraries work as expected.
But I'm a bit curious about using the header files from wine for mingw: What exactly has to be done to make them work? |
|||||||||||
|
|
||||||||||||

