升级 XCode 4.0 后出现 LLVM GCC 4.2 错误
我正在使用 此处 找到的 Twitter-OAuth 框架。一切都工作得很好,直到几天前我升级了 XCode。现在,当我尝试编译此应用程序时,我在 Twitter-OAuth 文件中收到错误消息:
@interface 中没有为“MGTwitterXMLParser”声明超类
,并且警告说
“MGTwitterXMLParser”可能不会响应“+alloc”
如果有人知道这里发生了什么,我将非常感谢一些帮助。
I am using Twitter-OAuth framework found Here. Everything was working great until a few days ago when I upgraded XCode. Now when I try to compile this application, I get errors in the Twitter-OAuth files that say
no super class declared in @interface for 'MGTwitterXMLParser'
and Warnings that say
'MGTwitterXMLParser' may not respond to '+alloc'
If anyone knows what is going on here, I would very much appreciate some help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
Chris,我不使用 MGTwitterXMLParser,但您问题中的第一条错误消息表明编译器期望 MGTwitterXMLParser 类的接口声明有一个父级。如果没有它,编译器会将 MGTwitterXMLParser 视为像 NSObject 一样的根类。
MGTwitterXMLParser.h 是否包含类似于
您问题中的第二个错误消息可能链接到第一个错误消息,因为编译器无法遍历 MGTwitterXMLParser 的继承树以找到其 +(id)alloc 的声明。
Chris, I don't use MGTwitterXMLParser but the first error message in your question suggest the compiler is expecting the interface declaration of MGTwitterXMLParser class to have a parent. Without that, the compiler will treat MGTwitterXMLParser as a root class like NSObject.
Does MGTwitterXMLParser.h contain something that looks like
The second error message in your question could be linked to the first as the compiler isn't able to traverse the inheritance tree of MGTwitterXMLParser to locate its the declaration of +(id)alloc.
显然,出现这个问题是因为 iOS SDK 4.0 认为需要将各种条目添加到构建设置中的标头搜索路径、框架搜索路径和库搜索路径中。我清理了这些区域,一切开始运转。
Apparently the issue arose because iOS SDK 4.0 feels the need to add all sorts of entries to the Header Search Paths, Framework Search Paths and Library Search Paths in the Build Settings. I cleaned those fields out and things started working.