キャッチされない例外:にReferenceError:「NSApplicationのは」未定義です
下記のリンクからアクセスしてくださいしています#import <Foundation/Foundation.h>
#import <AppKit/AppKit.h>
@interface Main : NSObject { }
@end
@implementation Main
+(void)main
{
NSLog(@"Hello world!");
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
NSApplication *anApplication = nil;
NSArray *screenArray = nil;
NSEnumerator *screenEnumerator = nil;
NSScreen *aScreen = nil;
NSWindowDepth *depths = null;//remove const
BOOL exactMatch = NO;
anApplication = [NSApplication sharedApplication];
screenArray = [NSScreen screens];
screenEnumerator = [screenArray objectEnumerator];
}
@end
exeptionを与える
@appu:いいえ、NSApplicationLoad()およびNSApplicationMain()はオブジェクトではなく関数です。そのうちの1人はNSApplicationのインスタンスを作成する必要があります。 – JeremyP
@appu:いいえ 'int sucess = NSApplicationLoad();' – JeremyP
あなたはフレームワークをリンクしていますか? – JeremyP