diff options
author | Erik Kundiman <erik@megapahit.org> | 2025-05-26 09:01:53 +0800 |
---|---|---|
committer | Erik Kundiman <erik@megapahit.org> | 2025-05-26 09:01:53 +0800 |
commit | 5360ea61d1de85444824636fbe45378b1d75c899 (patch) | |
tree | b671d53a323225cc76550080ff01601585a8b6c3 /scripts/code_tools | |
parent | e1070f0d1261f794fae4c0e99dcefb0cc64c3855 (diff) |
Make appdelegate-objc compilable again on Monterey
where the Xcode version is 14.2 and the SDK version is MacOSX13.1,
by specifically excluding llappdelegate-objc.mm from being compiled using
the C++20 standard. In this case, the standard is reverted to C++17 but
specifically only for that file.
The errors didn't happen on newer SDK versions such as the one in Sonoma
or Sequoia, and the errors looked completely unrelatable:
/Users/erik/Documents/Megapahit/viewer/indra/llwindow/llopenglview-objc.h:36:41: warning: cannot find protocol definition for 'NSTextInputClient'
@interface LLOpenGLView : NSOpenGLView <NSTextInputClient>
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextInputClient.h:20:11: note: protocol 'NSTextInputClient' has no definition
@protocol NSTextInputClient
^
In file included from /Users/erik/Documents/Megapahit/viewer/indra/newview/llappdelegate-objc.mm:27:
/Users/erik/Documents/Megapahit/viewer/indra/llwindow/llappdelegate-objc.h:30:38: warning: cannot find protocol definition for 'NSApplicationDelegate'
@interface LLAppDelegate : NSObject <NSApplicationDelegate> {
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSApplication.h:318:11: note: protocol 'NSApplicationDelegate' has no definition
@protocol NSApplicationDelegate <NSObject>
^
/Users/erik/Documents/Megapahit/viewer/indra/newview/llappdelegate-objc.mm:49:27: warning: instance method '-release' not found (return type defaults to 'id') [-Wobjc-method-access]
[currentInputLanguage release];
^~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSString.h:99:12: note: receiver is instance of class declared here
@interface NSString : NSObject <NSCopying, NSMutableCopying, NSSecureCoding>
^
/Users/erik/Documents/Megapahit/viewer/indra/newview/llappdelegate-objc.mm:107:33: warning: instance method '-UTF8String' not found (return type defaults to 'id') [-Wobjc-method-access]
const char* url_utf8 = [url UTF8String];
^~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSString.h:99:12: note: receiver is instance of class declared here
@interface NSString : NSObject <NSCopying, NSMutableCopying, NSSecureCoding>
^
/Users/erik/Documents/Megapahit/viewer/indra/newview/llappdelegate-objc.mm:107:17: error: cannot initialize a variable of type 'const char *' with an rvalue of type 'id'
const char* url_utf8 = [url UTF8String];
^ ~~~~~~~~~~~~~~~~
/Users/erik/Documents/Megapahit/viewer/indra/newview/llappdelegate-objc.mm:140:38: warning: instance method '-stopModal' not found (return type defaults to 'id') [-Wobjc-method-access]
[[NSApplication sharedApplication] stopModal];
^~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSApplication.h:158:12: note: receiver is instance of class declared here
@interface NSApplication : NSResponder <NSUserInterfaceValidations, NSMenuItemValidation, NSAccessibilityElement, NSAccessibility>
^
/Users/erik/Documents/Megapahit/viewer/indra/newview/llappdelegate-objc.mm:144:15: warning: instance method '-release' not found (return type defaults to 'id') [-Wobjc-method-access]
[frameTimer release];
^~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSTimer.h:10:12: note: receiver is instance of class declared here
@interface NSTimer : NSObject
^
/Users/erik/Documents/Megapahit/viewer/indra/newview/llappdelegate-objc.mm:157:15: warning: instance method '-release' not found (return type defaults to 'id') [-Wobjc-method-access]
[frameTimer release];
^~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSTimer.h:10:12: note: receiver is instance of class declared here
@interface NSTimer : NSObject
^
/Users/erik/Documents/Megapahit/viewer/indra/newview/llappdelegate-objc.mm:158:38: warning: instance method '-terminate:' not found (return type defaults to 'id') [-Wobjc-method-access]
[[NSApplication sharedApplication] terminate:self];
^~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSApplication.h:158:12: note: receiver is instance of class declared here
@interface NSApplication : NSResponder <NSUserInterfaceValidations, NSMenuItemValidation, NSAccessibilityElement, NSAccessibility>
^
/Users/erik/Documents/Megapahit/viewer/indra/newview/llappdelegate-objc.mm:206:35: error: declaration of 'arrayWithObjects:count:' is missing in NSArray class
NSArray* nonRomanScript = @[@"ja", @"ko", @"zh-Hant", @"zh-Hans"];
^
/Users/erik/Documents/Megapahit/viewer/indra/newview/llappdelegate-objc.mm:207:29: warning: instance method '-containsObject:' not found (return type defaults to 'id') [-Wobjc-method-access]
if ([nonRomanScript containsObject:currentInputLanguage])
^~~~~~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:17:12: note: receiver is instance of class declared here
@interface NSArray<__covariant ObjectType> : NSObject <NSCopying, NSMutableCopying, NSSecureCoding, NSFastEnumeration>
^
/Users/erik/Documents/Megapahit/viewer/indra/newview/llappdelegate-objc.mm:40:17: warning: method 'isEqual:' in protocol 'NSObject' not implemented [-Wprotocol]
@implementation LLAppDelegate
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/objc/NSObject.h:17:1: note: method 'isEqual:' declared here
- (BOOL)isEqual:(id)object;
^
/Users/erik/Documents/Megapahit/viewer/indra/newview/llappdelegate-objc.mm:40:17: warning: method 'class' in protocol 'NSObject' not implemented [-Wprotocol]
@implementation LLAppDelegate
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/objc/NSObject.h:21:1: note: method 'class' declared here
- (Class)class OBJC_SWIFT_UNAVAILABLE("use 'type(of: anObject)' instead");
^
/Users/erik/Documents/Megapahit/viewer/indra/newview/llappdelegate-objc.mm:40:17: warning: method 'self' in protocol 'NSObject' not implemented [-Wprotocol]
@implementation LLAppDelegate
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/objc/NSObject.h:22:1: note: method 'self' declared here
- (instancetype)self;
^
/Users/erik/Documents/Megapahit/viewer/indra/newview/llappdelegate-objc.mm:40:17: warning: method 'performSelector:' in protocol 'NSObject' not implemented [-Wprotocol]
@implementation LLAppDelegate
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/objc/NSObject.h:24:1: note: method 'performSelector:' declared here
- (id)performSelector:(SEL)aSelector;
^
/Users/erik/Documents/Megapahit/viewer/indra/newview/llappdelegate-objc.mm:40:17: warning: method 'performSelector:withObject:' in protocol 'NSObject' not implemented [-Wprotocol]
@implementation LLAppDelegate
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/objc/NSObject.h:25:1: note: method 'performSelector:withObject:' declared here
- (id)performSelector:(SEL)aSelector withObject:(id)object;
^
/Users/erik/Documents/Megapahit/viewer/indra/newview/llappdelegate-objc.mm:40:17: warning: method 'performSelector:withObject:withObject:' in protocol 'NSObject' not implemented [-Wprotocol]
@implementation LLAppDelegate
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/objc/NSObject.h:26:1: note: method 'performSelector:withObject:withObject:' declared here
- (id)performSelector:(SEL)aSelector withObject:(id)object1 withObject:(id)object2;
^
/Users/erik/Documents/Megapahit/viewer/indra/newview/llappdelegate-objc.mm:40:17: warning: method 'isProxy' in protocol 'NSObject' not implemented [-Wprotocol]
@implementation LLAppDelegate
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/objc/NSObject.h:28:1: note: method 'isProxy' declared here
- (BOOL)isProxy;
^
/Users/erik/Documents/Megapahit/viewer/indra/newview/llappdelegate-objc.mm:40:17: warning: method 'isKindOfClass:' in protocol 'NSObject' not implemented [-Wprotocol]
@implementation LLAppDelegate
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/objc/NSObject.h:30:1: note: method 'isKindOfClass:' declared here
- (BOOL)isKindOfClass:(Class)aClass;
^
/Users/erik/Documents/Megapahit/viewer/indra/newview/llappdelegate-objc.mm:40:17: warning: method 'isMemberOfClass:' in protocol 'NSObject' not implemented [-Wprotocol]
@implementation LLAppDelegate
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/objc/NSObject.h:31:1: note: method 'isMemberOfClass:' declared here
- (BOOL)isMemberOfClass:(Class)aClass;
^
/Users/erik/Documents/Megapahit/viewer/indra/newview/llappdelegate-objc.mm:40:17: warning: method 'conformsToProtocol:' in protocol 'NSObject' not implemented [-Wprotocol]
@implementation LLAppDelegate
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/objc/NSObject.h:32:1: note: method 'conformsToProtocol:' declared here
- (BOOL)conformsToProtocol:(Protocol *)aProtocol;
^
/Users/erik/Documents/Megapahit/viewer/indra/newview/llappdelegate-objc.mm:40:17: warning: method 'respondsToSelector:' in protocol 'NSObject' not implemented [-Wprotocol]
@implementation LLAppDelegate
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/objc/NSObject.h:34:1: note: method 'respondsToSelector:' declared here
- (BOOL)respondsToSelector:(SEL)aSelector;
^
/Users/erik/Documents/Megapahit/viewer/indra/newview/llappdelegate-objc.mm:40:17: warning: method 'retain' in protocol 'NSObject' not implemented [-Wprotocol]
@implementation LLAppDelegate
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/objc/NSObject.h:36:1: note: method 'retain' declared here
- (instancetype)retain OBJC_ARC_UNAVAILABLE;
^
/Users/erik/Documents/Megapahit/viewer/indra/newview/llappdelegate-objc.mm:40:17: warning: method 'release' in protocol 'NSObject' not implemented [-Wprotocol]
@implementation LLAppDelegate
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/objc/NSObject.h:37:1: note: method 'release' declared here
- (oneway void)release OBJC_ARC_UNAVAILABLE;
^
/Users/erik/Documents/Megapahit/viewer/indra/newview/llappdelegate-objc.mm:40:17: warning: method 'autorelease' in protocol 'NSObject' not implemented [-Wprotocol]
@implementation LLAppDelegate
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/objc/NSObject.h:38:1: note: method 'autorelease' declared here
- (instancetype)autorelease OBJC_ARC_UNAVAILABLE;
^
/Users/erik/Documents/Megapahit/viewer/indra/newview/llappdelegate-objc.mm:40:17: warning: method 'retainCount' in protocol 'NSObject' not implemented [-Wprotocol]
@implementation LLAppDelegate
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/objc/NSObject.h:39:1: note: method 'retainCount' declared here
- (NSUInteger)retainCount OBJC_ARC_UNAVAILABLE;
^
/Users/erik/Documents/Megapahit/viewer/indra/newview/llappdelegate-objc.mm:40:17: warning: method 'zone' in protocol 'NSObject' not implemented [-Wprotocol]
@implementation LLAppDelegate
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/objc/NSObject.h:41:1: note: method 'zone' declared here
- (struct _NSZone *)zone OBJC_ARC_UNAVAILABLE;
^
/Users/erik/Documents/Megapahit/viewer/indra/newview/llappdelegate-objc.mm:374:12: warning: 'NSApplication' may not respond to 'sendEvent:'
[super sendEvent:event];
~~~~~ ^
/Users/erik/Documents/Megapahit/viewer/indra/newview/llappdelegate-objc.mm:377:27: warning: 'NSWindow' may not respond to 'sendEvent:'
[[self keyWindow] sendEvent:event];
~~~~~~~~~~~~~~~~ ^
Diffstat (limited to 'scripts/code_tools')
0 files changed, 0 insertions, 0 deletions