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 771029 - MSVC can't link against autotools-build generated DLLs
MSVC can't link against autotools-build generated DLLs
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
1.9.2
Other Windows
: Normal blocker
: 1.9.90
Assigned To: Nirbheek Chauhan
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-09-08 00:51 UTC by Scott D Phillips
Modified: 2016-09-30 07:04 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Scott D Phillips 2016-09-08 00:51:08 UTC
The change https://cgit.freedesktop.org/gstreamer/gstreamer/commit/gst/gstconfig.h.in?id=22b892b44f5005d7af8d50df313e759bfdb1acd0 has it so autotools-generated gstconfig.h won't ever expand GST_EXPORT to __declspec(dllimport) in user-of-gstreamer builds.

I'm not an expert on windows object linking so maybe it was somehow subtly broken before, and not working at all is better? But if I change the expanded GSTCONFIG_USE_MSVC_DECLSPEC in gstconfig.h from '0' to '1' in the released 1.9.2 gstreamer devel package, then I am able to build a plugin with MSVC that can also work at runtime.
Comment 1 Nirbheek Chauhan 2016-09-10 15:55:48 UTC
I have a patch for this that I'm in the process of testing. Need to make sure that we cover all the cases this time and check that it works both for native and cross builds.
Comment 2 Nirbheek Chauhan 2016-09-13 08:18:55 UTC
commit b6e69ffdfb3bb21dbada8f01b488ae877f8d205c
Author: Nirbheek Chauhan <nirbheek@centricular.com>
Date:   Thu Sep 8 12:58:54 2016 +0530

    gstconfig: Use __declspec when built with MinGW and linking with MSVC
    
    Earlier we were only using __declspec(dllexport/import) when we were
    built with MSVC because when built with MinGW and linking with MinGW we
    don't need it (and we get linker errors because of it).
    
    However, when we're built with MinGW and someone wants to link to us
    with MSVC, we still need the prototypes to have __declspec(dllimport)
    since MSVC cannot do auto-import like GCC can.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=771029