2
我得到此錯誤: 架構'x86_64'和變體'normal'的OS X部署目標'10 .9'大於OS X 10.8 SDK的最大值'10.8'。依賴關係分析警告 - XCODE 5
這裏是我的代碼:
//
// AppDelegate.m
// IMG Viewer
//
// Created by Jeremy Irvine on 11/01/2014.
// Copyright (c) 2014 Jezza23 inc. All rights reserved.
//
#import "AppDelegate.h"
@implementation AppDelegate
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
{
}
- (IBAction)OpenImage:(id)sender {
NSOpenPanel *ImageOpener = [NSOpenPanel openPanel];
[ImageOpener runModal];
NSURL *imagePath = [ImageOpener URL];
NSImage *image = [[NSImage alloc] initWithContentsOfURL:imagePath];
[_ImageWindow setImage:image];
}
@end
而且AppDelegate.h:
//
// AppDelegate.h
// IMG Viewer
//
// Created by Jeremy Irvine on 11/01/2014.
// Copyright (c) 2014 Jezza23 inc. All rights reserved.
//
#import <Cocoa/Cocoa.h>
@interface AppDelegate : NSObject <NSApplicationDelegate>
@property (assign) IBOutlet NSWindow *window;
@property (weak) IBOutlet NSImageView *ImageWindow;
- (IBAction)OpenImage:(id)sender;
@end
檢查您的應用程序目標的構建設置,並確保您正在構建正確的操作系統版本並編譯x86 CPU。看起來你的代碼不是問題。 – Zarathuztra