| Summary: | Compile for iOS without joystick fails | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Ron Aaron <ron> |
| Component: | joystick | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | CC: | icculus |
| Version: | 2.0.10 | Keywords: | target-2.0.14 |
| Hardware: | ARM | ||
| OS: | iOS (All) | ||
Is this using Xcode? If not, how are you building it? Using 'build-scripts/iosbuild.sh' Just FYI, I have a similar issue on Android in that the created libSDL2.a is missing things: ./src/joystick/hidapi/SDL_hidapijoystick.c:573: error: undefined reference to 'hid_init' ./src/joystick/hidapi/SDL_hidapijoystick.c:811: error: undefined reference to 'hid_enumerate' that's created using the androidbuildlibs.sh script on Linux. Should I open a separate bug for that? Can you try the latest SDL snapshot? http://www.libsdl.org/tmp/SDL-2.0.zip You shouldn't get iOS errors about missing joystick stuff anymore when you build normally. If you build on iOS without joystick support you'll need to edit include/SDL_config_iphoneos.h to define SDL_JOYSTICK_DISABLED and comment out the other JOYSTICK drivers listed there. On Android I recommend using the shared library. If you don't, you'll need to link with hidapi, which is only available as a shared library: [armeabi-v7a] SharedLibrary : libhidapi.so [armeabi-v7a] Compile thumb : cpufeatures <= cpu-features.c [armeabi-v7a] StaticLibrary : libcpufeatures.a [armeabi-v7a] SharedLibrary : libSDL2.so [armeabi-v7a] Install : libSDL2.so => build/android/lib/armeabi-v7a/libSDL2.so [armeabi-v7a] StaticLibrary : libSDL2main.a [armeabi-v7a] Install : libhidapi.so => build/android/lib/armeabi-v7a/libhidapi.so Does this take care of the issues you're running into? This bug appears to be resolved. Ron, if you're still having issues, please reopen it and we'll look into it further. Thanks! --ryan. |
If I compile normally, the linker complains about a lot of missing joystick stuff. If I compile with --disable-joystick, I still get: Undefined symbols for architecture armv7: "_HIDAPI_UpdateDevices", referenced from: _SDL_JoystickUpdate in libSDL2.a(SDL_joystick.o) "_SDL_AppleTVRemoteOpenedAsJoystick", referenced from: -[SDL_uikitview pressesBegan:withEvent:] in libSDL2.a(SDL_uikitview.o) -[SDL_uikitview pressesEnded:withEvent:] in libSDL2.a(SDL_uikitview.o) -[SDL_uikitview pressesCancelled:withEvent:] in libSDL2.a(SDL_uikitview.o) "_SDL_HIDAPI_JoystickDriver", referenced from: _SDL_joystick_drivers in libSDL2.a(SDL_joystick.o) "_SDL_IOS_JoystickDriver", referenced from: _SDL_joystick_drivers in libSDL2.a(SDL_joystick.o)