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