I had over 200 errors in my Xcode project and found that my problem had to do with ARC being enabled. I followed the advice found here to use the flag -fno-objc-arc
. Now I am down to only 7 errors, but one of them is in my prefix.pch which is my prefix header for all source files, and says:
我的Xcode项目中有200多个错误,发现我的问题与启用ARC有关。我按照这里的建议使用标志-fno-objc-arc。现在我只有7个错误,但其中一个是在我的prefix.pch中,这是我所有源文件的前缀头,并说:
unrecognized command line option "-fno-objc-arc"
Any ideas? I'm using mac 10.6.8, ios sdk 4.3 and xcode 3.2.6
有任何想法吗?我使用的是mac 10.6.8,ios sdk 4.3和xcode 3.2.6
1 个解决方案
#1
3
Xcode 3.2.6 may not recognize the flag. From the docs:
Xcode 3.2.6可能无法识别该标志。来自文档:
ARC is supported in Xcode 4.2 for OS X v10.6 and v10.7 (64-bit applications) and for iOS 4 and iOS 5. Weak references are not supported in OS X v10.6 and iOS 4.
Xcode 4.2支持OS for OS X v10.6和v10.7(64位应用程序)以及iOS 4和iOS 5.OS X v10.6和iOS 4不支持弱引用。
You could try installing Xcode 4 and adding this build setting to Xcode 3:
您可以尝试安装Xcode 4并将此构建设置添加到Xcode 3:
CC = /Applications/Xcode4/Developer/usr/bin/clang
(path may be different). I think you need at least Snow Leopard for Xcode 4.
(路径可能不同)。我认为Xcode 4至少需要Snow Leopard。
#1
3
Xcode 3.2.6 may not recognize the flag. From the docs:
Xcode 3.2.6可能无法识别该标志。来自文档:
ARC is supported in Xcode 4.2 for OS X v10.6 and v10.7 (64-bit applications) and for iOS 4 and iOS 5. Weak references are not supported in OS X v10.6 and iOS 4.
Xcode 4.2支持OS for OS X v10.6和v10.7(64位应用程序)以及iOS 4和iOS 5.OS X v10.6和iOS 4不支持弱引用。
You could try installing Xcode 4 and adding this build setting to Xcode 3:
您可以尝试安装Xcode 4并将此构建设置添加到Xcode 3:
CC = /Applications/Xcode4/Developer/usr/bin/clang
(path may be different). I think you need at least Snow Leopard for Xcode 4.
(路径可能不同)。我认为Xcode 4至少需要Snow Leopard。