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 2298

Summary: undefined reference to `IID_IUnknown' on cygwin
Product: SDL Reporter: Brian Minton <brian>
Component: buildAssignee: Sam Lantinga <slouken>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2 CC: williamson.robert
Version: 2.0.1   
Hardware: x86   
OS: Windows 7   
Attachments: full link errors
Cygwin uuid library shadowing patch

Description Brian Minton 2013-12-11 19:40:04 UTC
Created attachment 1495 [details]
full link errors

This applies to 2.0.1 and latest hg as well.

When building static or shared libraries on cygwin 1.7.25 on Windows 7 (32-bit), I get the following link errors:

build/.libs/SDL_windowskeyboard.o: In function `UIElementSink_QueryInterface@12':
/home/c-bminton/src/SDL/src/video/windows/SDL_windowskeyboard.c:995: undefined reference to `IID_IUnknown'
build/.libs/SDL_windowskeyboard.o: In function `IPPASink_QueryInterface@12':
/home/c-bminton/src/SDL/src/video/windows/SDL_windowskeyboard.c:1101: undefined reference to `IID_IUnknown'
collect2: error: ld returned 1 exit status
Makefile:126: recipe for target 'build/libSDL2.la' failed
make: *** [build/libSDL2.la] Error 1
Comment 1 Robert Williamson 2014-02-19 23:08:58 UTC
Created attachment 1565 [details]
Cygwin uuid library shadowing patch

I had the same issue, it's related to a shadowed uuid library. See:

http://www.mail-archive.com/cygwin@cygwin.com/msg106029.html
http://article.gmane.org/gmane.os.cygwin.ports.general/736

I worked around it with the attached patch based off of
https://code.google.com/p/mintty/source/diff?spec=svn1025&r=1025&format=side&path=/trunk/Makefile
Comment 2 Sam Lantinga 2014-02-22 23:35:06 UTC
Fixed, thanks!
https://hg.libsdl.org/SDL/rev/751605725282