From 25fae923236cb855aad93d293025f4485d76f339 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Thu, 27 Jan 2011 13:27:09 +0000 Subject: [PATCH] Fix link errors under Cygwin with wxUSE_GRAPHICS_CONTEXT==1. Define ourselves _GdipStringFormatCachedGenericTypographic variable referenced by Cygwin GDI+ headers to fix linking errors due to the fact that we don't link with gdiplus.lib at all but load gdiplus.dll dynamically. Closes #11716. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66787 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/gdiplus.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/msw/gdiplus.cpp b/src/msw/gdiplus.cpp index fa3717bc46..df688b1135 100644 --- a/src/msw/gdiplus.cpp +++ b/src/msw/gdiplus.cpp @@ -734,6 +734,16 @@ wxFOR_ALL_GDIPLUS_STATUS_FUNCS(wxDECL_GDIPLUS_FUNC_TYPE) } // extern "C" +// Special hack for Cygwin: its headers reference this variable which is +// normally defined in Cygwin-specific gdiplus.lib but as we don't link with it +// and load gdiplus.dll dynamically, it's not defined in our case resulting in +// linking errors -- so just provide it ourselves, it doesn't matter where it +// is and if Cygwin headers are modified to not use it in the future, it's not +// a big deal neither, we'll just have an unused pointer. +#ifdef __CYGWIN__ +extern "C" void *_GdipStringFormatCachedGenericTypographic = NULL; +#endif // __CYGWIN__ + // ============================================================================ // wxGdiPlus helper class // ============================================================================ -- 2.45.2