Fixed bug 2298 - undefined reference to `IID_IUnknown' on cygwin

Brian Minton

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

--
The libuuid from e2fsprogs is completely unrelated to the w32api UUID.DLL implib. FWIW, any *NIX software that I've seen obviously wants the e2fsprogs version, but if libuuid-devel is installed (in /usr/lib) then you can't link against the w32api implib with a simple -luuid.
This commit is contained in:
Sam Lantinga 2014-02-22 15:34:31 -08:00
parent d3cf7360db
commit eb5eb04652
2 changed files with 12 additions and 2 deletions

7
configure vendored
View File

@ -22808,7 +22808,12 @@ $as_echo "#define SDL_LOADSO_WINDOWS 1" >>confdefs.h
have_loadso=yes
fi
# Set up the system libraries we need
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -luser32 -lgdi32 -lwinmm -limm32 -lole32 -loleaut32 -lshell32 -lversion -luuid -XCClinker -static-libgcc"
if -f /lib/w32api/libuuid.a ; then
LIBUUID=/lib/w32api/libuuid.a
else
LIBUUID=-luuid
fi
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -luser32 -lgdi32 -lwinmm -limm32 -lole32 -loleaut32 -lshell32 -lversion $LIBUUID -XCClinker -static-libgcc"
# The Windows platform requires special setup
VERSION_SOURCES="$srcdir/src/main/windows/*.rc"
SDLMAIN_SOURCES="$srcdir/src/main/windows/*.c"

View File

@ -2860,7 +2860,12 @@ AC_HELP_STRING([--enable-render-d3d], [enable the Direct3D render driver [[defau
have_loadso=yes
fi
# Set up the system libraries we need
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -luser32 -lgdi32 -lwinmm -limm32 -lole32 -loleaut32 -lshell32 -lversion -luuid -XCClinker -static-libgcc"
if [ -f /lib/w32api/libuuid.a ]; then
LIBUUID=/lib/w32api/libuuid.a
else
LIBUUID=-luuid
fi
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -luser32 -lgdi32 -lwinmm -limm32 -lole32 -loleaut32 -lshell32 -lversion $LIBUUID -XCClinker -static-libgcc"
# The Windows platform requires special setup
VERSION_SOURCES="$srcdir/src/main/windows/*.rc"
SDLMAIN_SOURCES="$srcdir/src/main/windows/*.c"