UIKit SDK 3.0错误 [英] UIKit SDK 3.0 error
问题描述
我正在使用iphone_sdk_3.0_beta_5__9m2735 SDK.当我尝试使用模拟器3.0选项编译代码时,出现以下错误.该代码为其余所有模拟器选项(即2.0、2.1、2.2、2.2.1)进行编译编译代码时出现以下错误
I am using iphone_sdk_3.0_beta_5__9m2735 SDK. When I try to compile my code using simulator 3.0 option I get following error. The code compiles for rest all simulator option ie 2.0, 2.1, 2.2, 2.2.1 While compiling my code I get following error
from /Users/videomac/manish/EXPLab/2009-05-27-11-20 myApp_LL_2/myApp_Prefix.pch:7:
In file included from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h:30,
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UILocalizedIndexedCollation.h:11: error: syntax error before 'AT_NAME' token
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UILocalizedIndexedCollation.h:19: error: syntax error before '}' token
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UILocalizedIndexedCollation.h:21: fatal error: method definition not in @implementation context
错误位于SDK文件UILocalizedIndexedCollation.h中.我正在使用SDK 3.0的UIKit Framework.谁能告诉我该怎么做才能消除此错误?
The errors are located in file UILocalizedIndexedCollation.h which is SDK file.I am using UIKit Framework of SDK 3.0. Can anyone tell me what should I do to remove this error?
推荐答案
我已经将此问题归结为所使用的编译器版本.据我所知,[已编辑]需要GCC 4.2,而iPhone SDK 2.x仅适用于GCC 4.0.
I've traced this problem to be the compiler version being used. From what I can tell, [REDACTED] requires GCC 4.2 while iPhone SDK 2.x only works with GCC 4.0.
这是解决此问题的一种方法.
Here's a way to fix this.
在您的 Target Info
中,选择 Build
分隔符,然后查找 Compiler Version
部分.然后:
In your Target Info
, select Build
separator and look for the section Compiler Version
. Then:
- 选择
C/C ++编译器版本
行 - 将默认设置设置为
GCC 4.0
- 在左下角的控件中,点击
添加构建设置条件
- 在左侧,选择
设备-iPhone OS 3.0
- 在右侧,选择
GCC 4.2
- 现在在步骤4上使用
Simulator-iPhone OS 3.0
重复步骤3至5.
- Select the
C/C++ Compiler Version
row - Set the default to
GCC 4.0
- At the bottom-left control, hit
Add Build Setting Condition
- On the left, choose
Device - iPhone OS 3.0
- On the right, chose
GCC 4.2
- Repeat steps 3 to 5, now with
Simulator - iPhone OS 3.0
on step 4.
这篇关于UIKit SDK 3.0错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!