diff --git a/src/common/cairo.cpp b/src/common/cairo.cpp index 871e320b05..46d649c9f1 100644 --- a/src/common/cairo.cpp +++ b/src/common/cairo.cpp @@ -25,6 +25,10 @@ #if wxUSE_CAIRO +#ifdef __WXMSW__ +#include "wx/msw/wrapwin.h" +#endif + #ifdef __WXMAC__ #include "wx/osx/private.h" #include diff --git a/src/generic/graphicc.cpp b/src/generic/graphicc.cpp index 76efcf4b2a..ec4830837f 100644 --- a/src/generic/graphicc.cpp +++ b/src/generic/graphicc.cpp @@ -81,6 +81,9 @@ using namespace std; #ifdef __WXMSW__ #include +// We must do this as cairo-win32.h includes windows.h which pollutes the +// global name space with macros. +#include "wx/msw/winundef.h" #endif #ifdef __WXMAC__