GNOME Bugzilla – Bug 764523
-lole32 is missing for libgstdirectsoundsrc
Last modified: 2016-04-20 13:54:40 UTC
Created attachment 325255 [details] [review] Fix the problem https://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=f9464ce3549c2b3948a582464631ba4f8dd0d5e7 uses CLSIDFromString(). To use CLSIDFromString(), we need to link against ole32.dll: See "DLL" in https://msdn.microsoft.com/en-us/library/windows/desktop/ms680589%28v=vs.85%29.aspx But the commit doesn't add "-lole32" to linker flags. It causes link error. I'm sorry but I didn't record the error. Here are steps to reproduce the same error: 1. Create a test program that uses CLSIDFromString: #include <windows.h> int main(void) { LPCOLESTR string = NULL; CLSID id; CLSIDFromString(string, &id); return 0; } 2. Build with MinGW: % x86_64-w64-mingw32-gcc a.c /tmp/ccj5AFMG.o:a.c:(.text+0x23): undefined reference to `__imp_CLSIDFromString' collect2: error: ld returned 1 exit status % 3. Add -lole32 flag % x86_64-w64-mingw32-gcc a.c -lole32 % (no error)
commit d27662fdcda67a00b65b415b722c601730f62240 Author: Kouhei Sutou <kou@clear-code.com> Date: Sun Apr 3 18:06:20 2016 +0900 directsoundsrc: add missing -lole32 CLSIDFromString() requires ole32.dll. See https://msdn.microsoft.com/en-us/library/windows/desktop/ms680589%28v=vs.85%29.aspx CLSIDFromString() is introduced at f9464ce3549c2b3948a582464631ba4f8dd0d5e7 . https://bugzilla.gnome.org/show_bug.cgi?id=764523