diff --git a/config.h.meson b/config.h.meson index ce2aeb2946..f6716795f9 100644 --- a/config.h.meson +++ b/config.h.meson @@ -230,6 +230,9 @@ /* Define to the version of this package. */ #mesondefine PACKAGE_VERSION +/* Define when building a shared library for Windows */ +#mesondefine DLL_EXPORT + /* Use NSBundle functions to determine load paths for libraries, translations, etc. */ #mesondefine QUARTZ_RELOCATION diff --git a/config.h.win32.in b/config.h.win32.in index 9666b1b872..a68a4f20a0 100644 --- a/config.h.win32.in +++ b/config.h.win32.in @@ -314,11 +314,16 @@ /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ +/* Define when building a shared library for Windows */ +#define DLL_EXPORT 1 + /* defines how to decorate public symbols while building */ -#ifdef _MSC_VER -#define _GDK_EXTERN __declspec (dllexport) extern -#else -#define _GDK_EXTERN __attribute__((visibility("default"))) __declspec (dllexport) extern +#ifdef DLL_EXPORT +# ifdef _MSC_VER +# define _GDK_EXTERN __declspec (dllexport) extern +# else +# define _GDK_EXTERN __attribute__((visibility("default"))) __declspec (dllexport) extern +# endif #endif /* Define for large files, on AIX-style hosts. */