我想从终端命令行编译一些东西。当我运行使它给了我这个错误:安装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