On Thu, 15 Aug 2024, Mark E Anderson wrote:

Just a heads up, `CGDisplayCreateImageForRect` is no longer supported in the 
macOS 15 SDK.

I don't know what SDK you're looking at, but I see that definition in the macOS 15 SDK here, in both the beta 4 and beta 6 versions of XCode 16.

If that were really true, it's a bug that would need to be fixed before it comes out of beta, since Apple encourages, and in some cases requires, builds to use the SDK for the next later OS version than the one being targeted. So the SDK for OS N+1 damn well better include all the definitions for OS N.

There are at least two bugs that *do* exist in the macOS 15 SDK, at least as of beta 6:

1) It still thinks it's a 14.0 SDK:
-------------------------------------------------------------------------
/*
 * if max OS not specified, assume larger of (10.15, min)
 */
#ifndef MAC_OS_X_VERSION_MAX_ALLOWED
    #if MAC_OS_X_VERSION_MIN_REQUIRED > MAC_OS_VERSION_14_0
        #define MAC_OS_X_VERSION_MAX_ALLOWED MAC_OS_X_VERSION_MIN_REQUIRED
    #else
        #define MAC_OS_X_VERSION_MAX_ALLOWED MAC_OS_VERSION_14_0
    #endif
#endif
-------------------------------------------------------------------------
Note that the comment is even more outdated than the code. :-)

2) There are new functions for half-precision floats in 15.x, and their prototypes are *unconditionally* included in math.h. That means that building anything that uses math.h with a compiler that doesn't provide the _Float16 type gets fatal errors. Availability attributes don't help with this, since the declarations themselves are illegal without the type. Usually, things of this form have conditionals related to compiler capabilities, but that's currently missing here, and the usual "define it as empty" approach doesn't work with types.

Anyone with a paid developer account should feel free to file bugs about those. Those of us who don't pay Apple for the privilege of telling them what they're doing wrong don't have that option.

On Fri, 16 Aug 2024, Mark E Anderson wrote:

I do! I'll look into that. Yeah, I don't even have the 14 SDK on this machine 
since Xcode 15 won't run.

You don't need to *run* a version of Xcode just to extract an SDK from it. Though in some cases you may trip over issues with the installer and/or unarchiver.

Fred Wright

Reply via email to