2015-07-20 134 views
0

我正试图在Mac OS X 10.7上使用mkbundle工具。我安装了XCode 5,这是几种不同的Mono版本,从v2到v4。每次我尝试编译我的代码时,我都会得到一个Mac OS X上的单声道mkbundle 10.7

sh: as: command not found 

当我尝试查找此命令时,它不在我的系统上。谷歌搜索后,这是非常困难的,因为“as”被过滤掉太泛,我根本无法找到解决方案。我可以找到的最好的资源说明它的XCode本机编译器,但我已经安装了...

有人可以协助吗?

回答

1

您正在寻找的Xcode汇编:

>男子为

NAME 
     as - Mac OS X Mach-O GNU-based assemblers 

SYNOPSIS 
     as [ option ... ] [ file ... ] 

DESCRIPTION 
     The as command translates assembly code in the named files to object code. 
     If no files are specified, as reads from stdin. All undefined symbols in 
     the assembly are treated as global. The output of the assembly is left in 
     the file a.out by default. 

     The program /usr/bin/as is actually a driver that executes assemblers for 
     specific target architectures. If no target architecture is specified, it 
     defaults to the architecture of the host it is running on. 

你有Xcode中它的安装CMD行工具?

> which as 
/usr/bin/as 

> file `which as` 
/usr/bin/as: Mach-O 64-bit executable x86_64 

位于Xcode.app:

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../libexec/as/x86_64/as 

的Xcode CMD行工具:

假设你已经通过应用商店安装了 '自由' 的Xcode包,CMD行工具可以通过“xcode-select”安装。通过在App Store

的Xcode选--help

Usage: xcode-select [options] 

Print or change the path to the active developer directory. This directory 
controls which tools are used for the Xcode command line tools (for example, 
xcodebuild) as well as the BSD development commands (such as cc and make). 

Options: 
    -h, --help     print this help message and exit 
    -p, --print-path   print the path of the active developer directory 
    -s <path>, --switch <path> set the path for the active developer directory 
    --install     open a dialog for installation of the command line developer tools 
    -v, --version    print the xcode-select version 
    -r, --reset     reset to the default command line tools path 

的Xcode选--install

安装完成后,你会得到更新:拖放到一个词窗口和

+0

命令行工具是应用程序商店中的独立包吗?或者是我可以在安装Xcode后安装的东西,如果是这样的话,如何? –

+0

谢谢!在您的初始指导下,我设法找到Xcode中的下载部分并从那里安装它。干杯! –

+0

太好了......我在IDE中忘记了这个选项,一直都是通过cmd行来做的;-) – SushiHangover