Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SDL fails to link on non-Windows systems since the recent changes to its Windows XInput code #1550

Closed
SDLBugzilla opened this issue Feb 10, 2021 · 0 comments

Comments

@SDLBugzilla
Copy link
Collaborator

This bug report was migrated from our old Bugzilla tracker.

These attachments are available in the static archive:

Reported in version: HG 2.0
Reported for operating system, platform: All, All

Comments on the original bug report:

On 2014-07-04 23:18:07 +0000, Alex Szpakowski wrote:

Since this commit: https://hg.libsdl.org/SDL/rev/dfc759d7486f , SDL fails to link when building on operating systems which don't define a SDL_SYS_IsXInputGamepad_DeviceIndex function (non-Windows systems.)

This is because SDL_PrivateGetControllerMapping ( https://hg.libsdl.org/SDL/file/47fb6a7e7f68/src/joystick/SDL_gamecontroller.c#l256 ) calls that system-specific function on all operating systems, even though it's only defined in Windows.

On 2014-07-06 03:46:10 +0000, Ben Boeckel wrote:

Created attachment 1737
Adds SDL_FALSE impl for all other platforms

Here's a patch which implements all non-Windows platforms with an SDL_FALSE function. Tested with an Android build.

On 2014-07-07 03:16:37 +0000, Andreas Schiffler wrote:

Occurs also on Windows cygwin builds.

$ ../configure --disable-haptic --disable-joystick
...
SDL2 Configure Summary:
Building Shared Libraries
Building Static Libraries
Enabled modules : atomic audio video render events power filesystem threads timers file loadso cpuinfo assembly
Assembly Math : mmx 3dnow sse
Audio drivers : disk dummy directx
Video drivers : dummy opengl directx
Input drivers :
Using libudev : NO
Using dbus : NO
Using ibus : NO

$ make

#(cd /cygdrive/i/Sources/SDL && sh autogen.sh && sh configure)
/bin/sh ../build-scripts/updaterev.sh
...
build/.libs/SDL_gamecontroller.o: In function SDL_PrivateGetControllerMapping': /cygdrive/i/Sources/SDL/src/joystick/SDL_gamecontroller.c:261: undefined reference to SDL_SYS_IsXInputGamepad_DeviceIndex'
/cygdrive/i/Sources/SDL/src/joystick/SDL_gamecontroller.c:261: undefined reference to SDL_SYS_IsXInputGamepad_DeviceIndex' /cygdrive/i/Sources/SDL/src/joystick/SDL_gamecontroller.c:261: undefined reference to SDL_SYS_IsXInputGamepad_DeviceIndex'
/cygdrive/i/Sources/SDL/src/joystick/SDL_gamecontroller.c:261: undefined reference to SDL_SYS_IsXInputGamepad_DeviceIndex' /cygdrive/i/Sources/SDL/src/joystick/SDL_gamecontroller.c:261: undefined reference to SDL_SYS_IsXInputGamepad_DeviceIndex'
build/.libs/SDL_gamecontroller.o:/cygdrive/i/Sources/SDL/src/joystick/SDL_gamecontroller.c:261: more undefined references to `SDL_SYS_IsXInputGamepad_DeviceIndex' follow
collect2: error: ld returned 1 exit status
Makefile:141: recipe for target 'build/libSDL2.la' failed
make: *** [build/libSDL2.la] Error 1

On 2014-07-07 17:27:12 +0000, Sam Lantinga wrote:

This is fixed, thanks!
https://hg.libsdl.org/SDL/rev/1a5d959d7b32

On 2014-07-08 06:49:21 +0000, Andreas Schiffler wrote:

Win7/cygwin builds fine now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant