After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 764523 - -lole32 is missing for libgstdirectsoundsrc
-lole32 is missing for libgstdirectsoundsrc
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Linux
: Normal normal
: 1.8.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
1.6.4
Depends on:
Blocks:
 
 
Reported: 2016-04-03 09:33 UTC by Kouhei Sutou
Modified: 2016-04-20 13:54 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix the problem (1.11 KB, patch)
2016-04-03 09:33 UTC, Kouhei Sutou
committed Details | Review

Description Kouhei Sutou 2016-04-03 09:33:03 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)
Comment 1 Sebastian Dröge (slomo) 2016-04-03 10:37:37 UTC
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