-#ifdef WIN32
+/* include platform.h first to get __WIN32__ definition */
+#include "wx/platform.h"
+#if defined(__WIN32__) || defined(__GNUWIN32__)
/* all Win32 compilers can handle C++ comments, and C++ comments
is the only C++ in setup.h */
#include "wx/setup.h"