2011-12-10 39 views
1

我想從終端命令行編譯一些東西。當我運行使它給了我這個錯誤:安裝XCode 4.2後,爲什麼xcodebuild找不到gcc 4-2?

error: can't exec '/Developer/Library/Xcode/PrivatePlugIns/Xcode3Core.ideplugin/Contents/Frameworks/DevToolsCore.framework/Resources/gcc-4.2' (No such file or directory) 

我該如何解決這個問題?爲什麼不在那裏找到gcc-4.2?其實我的gcc位於/ usr/bin。 有人可以幫我解決這個問題嗎?

UPDATE:

這裏是我的Makefile

default: 
    xcodebuild -target "Tests (Device)" -configuration Release 
    xcodebuild -target "Tests (Simulator)" -configuration Release 
    BUILD_DIR="build" BUILD_STYLE="Release" sh ../Scripts/CombineLibs.sh 
    sh ../Scripts/iOSFramework.sh 

# If you need to clean a specific target/configuration: $(COMMAND) -target $(TARGET) -configuration DebugOrRelease -sdk $(SDK) clean 
clean: 
    -rm -rf build/* 

test: 
    GHUNIT_CLI=1 xcodebuild -target Tests -configuration Debug -sdk iphonesimulator build 
+0

你怎麼做在命令行編譯?你使用'make'文件還是'xcodebuild'或? –

+0

它使用的是xcodebuild,我上面用我的Makefile進行了更新 – adit

+0

如果你自己運行「gcc-4.2」而沒有參數,會發生什麼? – jrtc27

回答

-2

因爲的XCode 4.2,蘋果從 「GCC 4.2」 改爲C編譯器 「蘋果LLVM編譯器3.0」

+0

不是OP要求的。海灣合作委員會仍在那裏。 – jrtc27

+0

是的,這並沒有回答這個問題 – adit