diff --git a/src/generic/graphicc.cpp b/src/generic/graphicc.cpp index d901678cd5..d5da4a5a7b 100755 --- a/src/generic/graphicc.cpp +++ b/src/generic/graphicc.cpp @@ -37,6 +37,8 @@ #include "wx/graphics.h" +#if wxUSE_GRAPHICS_CONTEXT + #include using namespace std; @@ -865,4 +867,6 @@ void wxCairoContext::SetFont( const wxFont &font ) wxGraphicsContext* wxGraphicsContext::Create( const wxWindowDC& dc ) { return new wxCairoContext(dc); -} \ No newline at end of file +} + +#endif // wxUSE_GRAPHICS_CONTEXT diff --git a/src/msw/graphics.cpp b/src/msw/graphics.cpp index e3a43c31d7..de74aa9ce9 100644 --- a/src/msw/graphics.cpp +++ b/src/msw/graphics.cpp @@ -38,6 +38,8 @@ #include "wx/graphics.h" +#if wxUSE_GRAPHICS_CONTEXT + #include using namespace std; @@ -945,3 +947,6 @@ wxGraphicsContext* wxGraphicsContext::Create( const wxWindowDC& dc) { return new wxGDIPlusContext( (HDC) dc.GetHDC() ); } + + +#endif // wxUSE_GRAPHICS_CONTEXT