| Summary: | Can't build on MinGW (32) with Joystick and Haptic | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Mike Kasprzak <mike> |
| Component: | joystick | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | CC: | gabomdq, icculus, rob |
| Version: | HG 2.0 | Keywords: | target-2.0.0 |
| Hardware: | x86 | ||
| OS: | Windows 7 | ||
|
Description
Mike Kasprzak
2013-03-02 18:39:42 UTC
What version of Mingw do you use and which platform? I compile SDL2 with Ubuntu 12.04 and AFAICT joystick support works fine. dpkg -S wbemcli mingw-w64-dev: /usr/i686-w64-mingw32/include/wbemcli.h mingw-w64-dev: /usr/x86_64-w64-mingw32/include/wbemcli.h dpkg -S xinput.h mingw-w64-dev: /usr/x86_64-w64-mingw32/include/xinput.h mingw-w64-dev: /usr/i686-w64-mingw32/include/xinput.h MinGW on Windows 7. The one here that comes with MSys. http://www.mingw.org MinGW64 is a separate/different project. Take a look here: http://buildbot.libsdl.org/builders/sdl-mingw-x86/builds/775/steps/configure/logs/stdio From that log, a suggestion that occurred to me is to make sure that the environment variable DXSDK_DIR is set properly, that may do the trick in your case (assuming you have the Platform SDK and DirectX SDK installed). Okay, good to know. I can certainly work around this for myself, but I want to mention older SDL builds did not require the DirectX/Platform SDK to be installed at all. The libraries shipped alongside MinGW were adequate (and do work for everything except the new Joystick code). If Mingw32 is providing those headers, and SDL is failing to include them, then it's something we can fix (we are probably missing some include path somewhere). If Mingw32 is not providing them, then there's no way around it but having the Platform and DirectX SDKs installed (in which case we should have a note in the README somewhere, and the joystick system could be disabled with a test in the configure script). If you can work a patch for that I'll review it. To be clear, if the headers aren't available and the configure script didn't disable these subsystems (or we fail to check for it at all), that's a bug and we should fix it, regardless of what MingW makes available. --ryan. (Sorry if you get a lot of copies of this email, we're touching dozens of bug reports right now.) Tagging a bunch of bugs as target-2.0.0, Priority 2. This means we're in the final stretch for an official SDL 2.0.0 release! These are the bugs we really want to fix before shipping if humanly possible. That being said, we don't promise to fix them because of this tag, we just want to make sure we don't forget to deal with them before we bless a final 2.0.0 release, and generally be organized about what we're aiming to ship. Hopefully you'll hear more about this bug soon. If you have more information (including "this got fixed at some point, nevermind"), we would love to have you come add more information to the bug report when you have a moment. Thanks! --ryan. This bug still exists as of revision 7700. This trivial patch is what I sent to MXE[1] to get it building. I have no way of knowing if the alternate SDL_mmjoystick actually works though. A successful build is all I needed for now.
--- a/configure.in Sat Sep 14 11:25:52 2013 -0700
+++ b/configure.in Fri Sep 27 15:03:58 2013 +1000
@@ -2127,7 +2127,7 @@
# FIXME: latest Cygwin finds dinput headers, but we die on other win32 headers.
# FIXME: ...so force it off for now.
case "$host" in
- *-*-cygwin*)
+ *-*-cygwin* | *-*-mingw32*)
have_dinput=false
;;
esac
1. https://github.com/mxe/mxe/pull/247
You can now build SDL with MinGW and it will correctly not build the haptic support, and will build the winmm joystick driver. Great! Yes it works now. Thanks again. No problem! :) |