We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 1869

Summary: Changeset 76fa20889de8 breaks linking
Product: SDL Reporter: ny00
Component: joystickAssignee: Sam Lantinga <slouken>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2    
Version: HG 2.0   
Hardware: x86_64   
OS: Windows (All)   
Attachments: MinGW-w64 package list (from dpkg-query)

Description ny00 2013-05-27 07:40:34 UTC
Created attachment 1153 [details]
MinGW-w64 package list (from dpkg-query)

With the changeset given in the summary (as well as a more recent one), I get an error looking like this at the linking stage:

Creating library file: build/.libs/libSDL2.dll.a
build/.libs/SDL_dxjoystick.o: In function `IsXInputDevice':
/path/to/SDL_mercurial/build-mingw-w64/../src/joystick/windows/SDL_dxjoystick.c:416: undefined reference to `_IID_IWbemLocator'

It should be noted that I have had no compilation error with 76fa20889de8, nor with the preceding changeset of 2435b221d77d. Furthermore, I can build a working SDL2.dll file using revision 2435b221d77d.

For reference, I have cross-compiled from Ubuntu 12.04 (x86-64), using something like this before a call to "make":

../configure --host=i686-w64-mingw32 --prefix=/path/to/SDL2_inst

Furthermore, I have attached a list of mingw-w64 related packages, along with their versions.
Comment 1 Sam Lantinga 2013-05-27 19:39:57 UTC
This is fixed in the most current mingw-w64 packages available from:
http://mingw-w64.sourceforge.net/

Either that or the most current mingw-w64 packages are broken in that they unconditionally define that GUID in the headers, which means we can't define it in the source file.

Do you know of a way to tell which version of mingw-w64 you're compiling with?
Comment 2 ny00 2013-05-28 02:37:04 UTC
Thanks for informing about a solution.

I currently write this from a different PC, but based on the given package list I can say it has mingw-w64 version 2.0.1-1 installed (as reported by dpkg-query), with GCC version 4.6.3-1ubuntu5+5ubuntu1 (from the same report).
Comment 3 Sam Lantinga 2017-09-05 04:22:03 UTC
This appears to be fixed in the latest mingw-w64 release.