2016-09-16 66 views
1

的MacOS的命令行工具的XCode 8.沒有建立我的模板項目這是整個代碼:製作Xcode 8命令行工具模板需要執行哪些步驟?

#import <Foundation/Foundation.h> 

int main(int argc, const char * argv[]) { 
    @autoreleasepool { 
     // insert code here... 
     NSLog(@"Hello, World!"); 
    } 
    return 0; 
} 

故障發生在導入行。下面重現錯誤輸出的開始。

我有一臺運行El Capitan的新機器。我在一週前從GM下載(不是應用程序商店)安裝了Xcode 8。

我需要做些什麼來完成這個任務?

錯誤輸出:

In file included from /Users/ahcox/dev/macos/CommandLine001/CommandLine001/main.m:9: 
In file included from /Users/ahcox/Downloads/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:48: 
In file included from /Users/ahcox/Downloads/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSKeyedArchiver.h:9: 
/Users/ahcox/Downloads/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSGeometry.h:20:9: error: unknown type name 'CGPoint'; did you mean 'Point'? 
typedef CGPoint NSPoint; 
     ^
In file included from /Users/ahcox/dev/macos/CommandLine001/CommandLine001/main.m:9: 
In file included from /Users/ahcox/Downloads/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:6: 
In file included from /Users/ahcox/Downloads/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:43: 
In file included from /Users/ahcox/Downloads/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFBase.h:77: 
/Users/ahcox/Downloads/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include/MacTypes.h:542:41: note: 'Point' declared here 
typedef struct Point     Point; 
             ^
... 
+0

請投票結束。我基本上是問如何在沒有意識到的情況下在這個問題上在MacOS上安裝應用程序。 Xcode是我在第一臺Mac上安裝的第一個應用程序,您會看到:-)。 – ahcox

回答

0

安裝的Xcode下/Applications/

尋找在這些路徑中,Xcode是直接從在其被從所述轉基因種子XIP文件解包(下載目錄中運行,即它是在"/Users/ahcox/Downloads/Xcode.app/")。可以手動將其複製到/Applications/或運行App Store應用程序,並讓它在需要的位置安裝Xcode。爲了解決這個問題,我做了後者。 有關更多信息installation of apps on MacOS

相關問題