• Tim-Philipp Müller's avatar
    libs: fix 'inconsistent DLL linkage' warnings on Windows · 46ed0f04
    Tim-Philipp Müller authored
    For each lib we build export its own API in headers when we're
    building it, otherwise import the API from the headers.
    
    This fixes linker warnings on Windows when building with MSVC.
    
    The problem was that we had defined all GST_*_API decorators
    unconditionally to GST_EXPORT. This was intentional and only
    supposed to be temporary, but caused linker warnings because
    we tell the linker that we want to export all symbols even
    those from externall DLLs, and when the linker notices that
    they were in external DLLS and not present locally it warns.
    
    What we need to do when building each library is: export
    the library's own symbols and import all other symbols. To
    this end we define e.g. BUILDING_GST_FOO and then we define
    the GST_FOO_API decorator either to export or to import
    symbols depending on whether BUILDING_GST_FOO is set or not.
    That way external users of each library API automatically
    get the import.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=797185
    46ed0f04
Name
Last commit
Last update
common @ ed78bee4 Loading commit data...
data Loading commit data...
docs Loading commit data...
gst Loading commit data...
hooks Loading commit data...
libs Loading commit data...
m4 Loading commit data...
pkgconfig Loading commit data...
plugins Loading commit data...
po Loading commit data...
scripts Loading commit data...
tests Loading commit data...
tools Loading commit data...
.gitignore Loading commit data...
.gitmodules Loading commit data...
AUTHORS Loading commit data...
COPYING Loading commit data...
ChangeLog Loading commit data...
MAINTAINERS Loading commit data...
Makefile.am Loading commit data...
NEWS Loading commit data...
README Loading commit data...
README.static-linking Loading commit data...
RELEASE Loading commit data...
TODO Loading commit data...
autogen.sh Loading commit data...
configure.ac Loading commit data...
gst-element-check-1.0.m4 Loading commit data...
gstreamer.doap Loading commit data...
meson.build Loading commit data...
meson_options.txt Loading commit data...
stamp.h.in Loading commit data...