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
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
Other Windows
: Normal blocker
: 1.9.90
Assigned To: Nirbheek Chauhan
GStreamer Maintainers
Depends on:
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 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 <>
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.