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