Hi,
I'm trying to set up a quick demo app for part of our technology stack. (Basically implementing the same small app necessities for MacOS that we already have running on Linux and Windows.)
But I'm getting some errors in Apple headers that I don't how to solve.
From #import <Cocoa/Cocoa.h>
I'm getting the following errors:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:13:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/AppKit.h:14:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSAccessibility.h:12:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSAccessibilityConstants.h:130:15: error: unknown type name 'NSAttributedStringKey'; did you mean 'NSAttributedString'?
APPKIT_EXTERN NSAttributedStringKey const NSAccessibilityFontTextAttribute; //(NSDictionary<NSAccessibilityFontAttributeKey, id> *)
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFBase.h:255:8: note: 'NSAttributedString' declared here
@class NSAttributedString;
^
Does anyone know what I'm doing wrong? Should I be declaring some preprocessor symbol or including some other header files before #import <Cocoa/Cocoa.h>
?
I'm building from the command line with XCode Version 14.2 (14C18) on macOS Ventura 13.0 (22A8381).
Cheers, James