我想從終端命令行編譯一些東西。當我運行使它給了我這個錯誤:安裝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
你怎麼做在命令行編譯?你使用'make'文件還是'xcodebuild'或? –
它使用的是xcodebuild,我上面用我的Makefile進行了更新 – adit
如果你自己運行「gcc-4.2」而沒有參數,會發生什麼? – jrtc27