I’m getting the following deprecation warning in juce_mac_Windowing.mm
:
[{
"resource": "<my_project>/JUCE/modules/juce_gui_basics/native/juce_Windowing_mac.mm",
"owner": "cmake-build-diags",
"severity": 8,
"message": "'CGWindowListCreateImage' is deprecated: first deprecated in macOS 14.0 - This API is deprecated. Please use ScreenCaptureKit's captureScreenshot APIs instead. [-Werror,-Wdeprecated-declarations]",
"source": "GCC",
"startLineNumber": 513,
"startColumn": 33,
"endLineNumber": 513,
"endColumn": 1000,
"relatedInformation": [
{
"startLineNumber": 266,
"startColumn": 33,
"endLineNumber": 266,
"endColumn": 1000,
"message": "'CGWindowListCreateImage' has been explicitly marked deprecated here",
"resource": "/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.0.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGWindow.h"
}
]
}]
This is on the Senoma beta using the latest tip of the develop
branch of JUCE.
I can simply turn of -Werror
for now and ignore the warning, but this will presumably need to be addressed before Senoma is fully released?
1 Like
Wow, the macOS 14.0 SDK really messed things up for me - I couldn’t even build juceaide
due to the above deprecations! Ended up having to rename /Library/Developer/CommandLineTools/SDKs/MacOSX.14.0.sdk/
to force CMake to use the macOS 13 SDK instead as, for some reason, it wouldn’t respect the CMAKE_OSX_SYSROOT
option.
1 Like
reuk
August 9, 2023, 10:29am
3
Thanks for reporting, we should have some fixes for the deprecations out shortly.
Linking this related post for completeness:
Are you using the latest Sonoma/Xcode beta versions? With Sonoma beta 5 and Xcode beta 6 I’m not seeing this when building juceaide or the DemoRunner.
The JSON issue looks a bit familiar - I was seeing something like that with an older Xcode beta on Ventura, so i suspect there may have been a compiler bug. If you’re not using the latest beta, it’s probably worth updating and checking whether the issue is still present.
Other than that, we’ve got a couple of fixes for deprecated APIs in Sonoma…
1 Like
reuk
August 10, 2023, 3:01pm
4
Deprecation warnings should now be resolved on Sonoma:
committed 03:48PM - 09 Aug 23 UTC
We don’t have Sonoma on our CI yet (we’ll probably wait for the stable release first) so it’s possible I missed some bits - let me know if you find anything else that doesn’t build cleanly on Sonoma.
2 Likes
Yeah that appears to be working well!
I’m still getting this warning so not 100% unblocked, but can at least work around that one easier