UIKit SDK 3.0错误 [英] UIKit SDK 3.0 error

查看:41
本文介绍了UIKit SDK 3.0错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用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文件UILocalizedIndexedCollat​​ion.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:

  1. 选择 C/C ++编译器版本
  2. 将默认设置设置为 GCC 4.0
  3. 在左下角的控件中,点击添加构建设置条件
  4. 在左侧,选择设备-iPhone OS 3.0
  5. 在右侧,选择 GCC 4.2
  6. 现在在步骤4上使用 Simulator-iPhone OS 3.0 重复步骤3至5.
  1. Select the C/C++ Compiler Version row
  2. Set the default to GCC 4.0
  3. At the bottom-left control, hit Add Build Setting Condition
  4. On the left, choose Device - iPhone OS 3.0
  5. On the right, chose GCC 4.2
  6. Repeat steps 3 to 5, now with Simulator - iPhone OS 3.0 on step 4.

这篇关于UIKit SDK 3.0错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆