2015-07-20 136 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