[atkmm] atkmmconfig.h.*: Don't dllimport on MinGW
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [atkmm] atkmmconfig.h.*: Don't dllimport on MinGW
- Date: Tue, 9 Mar 2021 08:06:44 +0000 (UTC)
commit e082527c08204bbe157e56eae6f816555f5a1016
Author: Chun-wei Fan <fanchunwei src gnome org>
Date: Tue Mar 9 15:37:44 2021 +0800
atkmmconfig.h.*: Don't dllimport on MinGW
This will fix warnings when building items using atkmm with MinGW/GCC.
Please see: https://gitlab.gnome.org/GNOME/gtkmm/-/issues/90
atk/atkmmconfig.h.in | 4 +++-
atk/atkmmconfig.h.meson | 4 +++-
2 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/atk/atkmmconfig.h.in b/atk/atkmmconfig.h.in
index 161f131..7635dff 100644
--- a/atk/atkmmconfig.h.in
+++ b/atk/atkmmconfig.h.in
@@ -25,8 +25,10 @@
#ifdef ATKMM_DLL
# ifdef ATKMM_BUILD
# define ATKMM_API __declspec(dllexport)
-# else
+# elif !defined (__GNUC__)
# define ATKMM_API __declspec(dllimport)
+# else /* don't dllimport classes/methods on GCC/MinGW */
+# define ATKMM_API
# endif
#else
# define ATKMM_API
diff --git a/atk/atkmmconfig.h.meson b/atk/atkmmconfig.h.meson
index 5ddc007..9e5c2f5 100644
--- a/atk/atkmmconfig.h.meson
+++ b/atk/atkmmconfig.h.meson
@@ -28,8 +28,10 @@
#ifdef ATKMM_DLL
# ifdef ATKMM_BUILD
# define ATKMM_API __declspec(dllexport)
-# else
+# elif !defined (__GNUC__)
# define ATKMM_API __declspec(dllimport)
+# else /* don't dllimport classes/methods on GCC/MinGW */
+# define ATKMM_API
# endif
#else
# define ATKMM_API
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]