From 64257d1f6bcdef35a4f84b825826eb276a4956df Mon Sep 17 00:00:00 2001 From: Erwin Janssen Date: Mon, 27 Mar 2017 22:53:07 +0200 Subject: [PATCH] Use dllimport to link gd fonts on Windows Using extern to link the gd fonts on Windows doesn't work, they should be imported from the DLL using __declspec(dllimport). Also update the libgd DLL to the most recent version. --- plugin/gd/gvrender_gd.c | 7 ++++++- windows/dependencies/libraries | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/plugin/gd/gvrender_gd.c b/plugin/gd/gvrender_gd.c index f989d002e..5008754f0 100644 --- a/plugin/gd/gvrender_gd.c +++ b/plugin/gd/gvrender_gd.c @@ -293,7 +293,12 @@ static void gdgen_missingfont(char *err, char *fontreq) /* fontsize at which text is rendered by a simple line */ #define FONTSIZE_TOO_SMALL 1.5 -extern gdFontPtr gdFontTiny, gdFontSmall, gdFontMediumBold, gdFontLarge, gdFontGiant; +#ifdef _WIN32 +# define GD_IMPORT __declspec(dllimport) +#else +# define GD_IMPORT extern +#endif +GD_IMPORT gdFontPtr gdFontTiny, gdFontSmall, gdFontMediumBold, gdFontLarge, gdFontGiant; void gdgen_text(gdImagePtr im, pointf spf, pointf epf, int fontcolor, double fontsize, int fontdpi, double fontangle, char *fontname, char *str) { diff --git a/windows/dependencies/libraries b/windows/dependencies/libraries index 95a696430..7cb2b3437 160000 --- a/windows/dependencies/libraries +++ b/windows/dependencies/libraries @@ -1 +1 @@ -Subproject commit 95a696430d3c5ac67c3c122f951e42282bec5c86 +Subproject commit 7cb2b3437a3d104d869a534a780805b27d086a6a -- 2.40.0