From 8ece1737f4e7216702f50c0478cfc98a476774c8 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 1 Oct 2007 12:14:35 +0000 Subject: [PATCH] define WXDLLIMPEXP_FWD_XXX as nothing for mingw32 too to avoid warnings about __declspec being ignored in forward declarations git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49005 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/dlimpexp.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/include/wx/dlimpexp.h b/include/wx/dlimpexp.h index f6effd3444..b429d2d938 100644 --- a/include/wx/dlimpexp.h +++ b/include/wx/dlimpexp.h @@ -241,9 +241,13 @@ #define WXDLLIMPEXP_STC #endif -/* GCC warns about using __attribute__ on forward declarations, so we need - another set of macros for them: */ -#if defined(HAVE_VISIBILITY) +/* + 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__)) #define WXDLLIMPEXP_FWD_BASE #define WXDLLIMPEXP_FWD_NET #define WXDLLIMPEXP_FWD_CORE