Iphone 为什么可以';在安装XCode 4.2之后,是否要查找GCC4-2?

Iphone 为什么可以';在安装XCode 4.2之后,是否要查找GCC4-2?,iphone,xcode,gcc,makefile,xcode4.2,Iphone,Xcode,Gcc,Makefile,Xcode4.2,我试图从终端命令行编译一些东西。当我运行make时,会出现以下错误: 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

我试图从终端命令行编译一些东西。当我运行make时,会出现以下错误:

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。 有人能帮我解决这个问题吗

更新:

这是我的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

从XCode 4.2开始,Apple将C编译器从“GCC 4.2”更改为“Apple LLVM编译器3.0”

您是如何在命令行上进行编译的?您使用的是
make
文件还是
xcodebuild
或?它使用的是xcodebuild,我在上面用我的Makefile更新了。如果您自己运行“gcc-4.2”而没有参数,会发生什么?@jrtc27如果您的意思是在终端上键入,那么它会说command not found,而不是OP所要求的。GCC仍然存在。