X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/fa5f72b36fb55f3445683f0e1cd15f39c2d54a0c..4681a3ea0d0502ec7a787bc4dd24e43718a02b7c:/src/msw/gdiplus.cpp diff --git a/src/msw/gdiplus.cpp b/src/msw/gdiplus.cpp index afdfc003ed..df688b1135 100644 --- a/src/msw/gdiplus.cpp +++ b/src/msw/gdiplus.cpp @@ -27,6 +27,7 @@ #ifndef WX_PRECOMP #include "wx/cpp.h" + #include "wx/log.h" #include "wx/module.h" #include "wx/string.h" #endif // WX_PRECOMP @@ -733,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 // ============================================================================ @@ -806,7 +817,7 @@ bool wxGdiPlus::DoInit() // we're prepared to handler errors so suppress log messages about them wxLogNull noLog; - wxDynamicLibrary dllGdip(_T("gdiplus.dll"), wxDL_VERBATIM); + wxDynamicLibrary dllGdip(wxT("gdiplus.dll"), wxDL_VERBATIM); if ( !dllGdip.IsLoaded() ) return false; @@ -817,14 +828,14 @@ bool wxGdiPlus::DoInit() return false; #define wxLOAD_GDIPLUS_FUNC(name, params, args) \ - wxDO_LOAD_FUNC(name, _T("Gdiplus") wxSTRINGIZE_T(name)) + wxDO_LOAD_FUNC(name, wxT("Gdiplus") wxSTRINGIZE_T(name)) wxFOR_ALL_GDIPLUS_FUNCNAMES(wxLOAD_GDIPLUS_FUNC) #undef wxLOAD_GDIPLUS_FUNC #define wxLOAD_GDIP_FUNC(name, params, args) \ - wxDO_LOAD_FUNC(name, _T("Gdip") wxSTRINGIZE_T(name)) + wxDO_LOAD_FUNC(name, wxT("Gdip") wxSTRINGIZE_T(name)) wxFOR_ALL_GDIP_FUNCNAMES(wxLOAD_GDIP_FUNC)