From: Mansour M. <man...@gm...> - 2021-04-04 14:01:23
|
On Sat, Apr 3, 2021 at 9:53 AM Kevan Hashemi <ha...@br...> wrote: > /Users/kevan/Desktop/Scratch/TclTk/TclTk8.7a3/tk/unix/../macosx/ttkMacOSXTheme.c:408:12: error: implicit declaration of > function 'CGPathCreateWithRoundedRect' is invalid in C99 [-Werror,-Wimplicit-function-declaration] > path = CGPathCreateWithRoundedRect(bounds, radius, radius, NULL); CGPathCreateWithRoundedRect is only available with 10.9 and above: https://developer.apple.com/documentation/coregraphics/1411218-cgpathcreatewithroundedrect The simplest solution is to set MACOSX_DEPLOYMENT_TARGET to 10.9. The other solution is as follows. There is indeed a check for the availability of CGPathCreateWithRoundedRect in macosx/ttkMacOSXTheme.c, line 122: #if MAC_OS_X_VERSION_MAX_ALLOWED >= 1080 #define CGCOLOR(nscolor) nscolor.CGColor #else #define CGCOLOR(nscolor) (0 ? (CGColorRef) nscolor : NULL) #define CGPathCreateWithRoundedRect(w, x, y, z) NULL #endif But it's looking for the wrong version (10.8 not 10.9). The check for CGPathCreateWithRoundedRect (10.9+) should be separated from the check for NSColor.CGColor (10.8+). Here is a patch: --- ttkMacOSXTheme.c.orig 2021-04-04 09:58:16.000000000 -0400 +++ ttkMacOSXTheme.c 2021-04-04 09:53:31.000000000 -0400 @@ -123,6 +123,8 @@ #define CGCOLOR(nscolor) nscolor.CGColor #else #define CGCOLOR(nscolor) (0 ? (CGColorRef) nscolor : NULL) +#endif +#if MAC_OS_X_VERSION_MAX_ALLOWED < 1090 #define CGPathCreateWithRoundedRect(w, x, y, z) NULL #endif |