2011-12-10 42 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