构建 Xcode 8 命令行工具模板需要哪些步骤?
What steps are required to make the Xcode 8 Command Line Tools template build?
我无法在 XCode 中构建 MacOS 命令行工具的模板项目 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;
^
...
在 /Applications/
下安装 Xcode
查看这些路径,Xcode 是 运行 直接从 GM 种子 xip 文件解压的下载目录(即在 "/Users/ahcox/Downloads/Xcode.app/"
中)。手动将其复制到 /Applications/
或 运行 App Store 应用程序,然后让它在需要的地方安装 Xcode。为了自己解决这个问题,我做了后者。
有关 installation of apps on MacOS.
的更多信息
我无法在 XCode 中构建 MacOS 命令行工具的模板项目 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;
^
...
在 /Applications/
下安装 Xcode
查看这些路径,Xcode 是 运行 直接从 GM 种子 xip 文件解压的下载目录(即在 "/Users/ahcox/Downloads/Xcode.app/"
中)。手动将其复制到 /Applications/
或 运行 App Store 应用程序,然后让它在需要的地方安装 Xcode。为了自己解决这个问题,我做了后者。
有关 installation of apps on MacOS.