未能执行/Applications/Xcode.app/Contents/Developer/usr/bin/clang



Xcode 5破坏了我的编译脚本。我怀疑是因为clang现在直接位于/usr/bin中,而不是通常的位置。然而,我不确定如何将此告知gcc。任何提示都将不胜感激。我正在为iOS进行编译。

CPPFLAGS= -arch i686 --sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.0.sdk -fno-short-wchar -fno-short-enums -miphoneos-version-min=4.2.1
CXXFLAGS= -arch i686 --sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.0.sdk -fno-short-wchar -fno-short-enums -miphoneos-version-min=4.2.1
CFLAGS=
gcc -Iinclude  -arch i686 --sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.0.sdk -fno-short-wchar -fno-short-enums -miphoneos-version-min=4.2.1   -c -o src_c/stem_UTF_8_danish.o src_c/stem_UTF_8_danish.c
gcc: failed to exec /Applications/Xcode.app/Contents/Developer/usr/bin/clang: No such file or directory
make: *** [src_c/stem_UTF_8_danish.o] Error 71

更新我可以在没有参数的情况下直接从iPhoneSimulator usr/bin调用gcc来重复这个问题。

tim$ /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform//Developer/us                                    r/bin/gcc
gcc: failed to exec /Applications/Xcode.app/Contents/Developer/usr/bin/clang: No such file or directory

我能够通过使用/usr/bin中的clang和相应的sysroot进行编译。但这是等价的吗?

当我升级到Xcode 5.1时,我注意到了同样的问题。当我运行"xcrun-find clang"时,它说"你没有同意Xcode许可协议。你必须同意下面的两个Xcode许可协议才能使用Xcode。"它吐出了协议,给了我一个同意的机会,我照做了。这就解决了问题。想想看。

干杯-Ed

相关内容

最新更新