2016-09-16 67 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

相关问题