-/* GCC warns about using __attribute__ on forward declarations, so we need
- another set of macros for them: */
-#if defined(HAVE_VISIBILITY)
+#ifdef WXMAKINGDLL_WEBVIEW
+# define WXDLLIMPEXP_WEBVIEW WXEXPORT
+# define WXDLLIMPEXP_DATA_WEBVIEW(type) WXEXPORT type
+#elif defined(WXUSINGDLL)
+# define WXDLLIMPEXP_WEBVIEW WXIMPORT
+# define WXDLLIMPEXP_DATA_WEBVIEW(type) WXIMPORT type
+#else /* not making nor using DLL */
+# define WXDLLIMPEXP_WEBVIEW
+# define WXDLLIMPEXP_DATA_WEBVIEW(type) type
+#endif
+
+/*
+ GCC warns about using __attribute__ (and also __declspec in mingw32 case) on
+ forward declarations while MSVC complains about forward declarations without
+ __declspec for the classes later declared with it, so we need a separate set
+ of macros for forward declarations to hide this difference:
+ */
+#if defined(HAVE_VISIBILITY) || (defined(__WINDOWS__) && defined(__GNUC__))