【问题标题】:iPhone - ShareKit , SHK.m giving the compiler error for FileNot FoundiPhone - ShareKit , SHK.m 给出 File Not Found 的编译器错误
【发布时间】:2012-01-08 18:40:19
【问题描述】:
我在使用 ShareKit Integrated 编译我的 iphone 项目时遇到了这个问题。我一直在努力,到目前为止一切正常,突然之间它给了我错误。在 SHK.m 文件中,
#import </usr/include/objc/objc-class.h> file not found
我想我不小心更改了某些内容或删除了任何文件。不明白发生了什么错误。有人可以帮我解决这个问题吗??
注意:(我没有更改我的 Xcode,也没有更改项目位置或任何东西)
【问题讨论】:
标签:
iphone
compiler-errors
sharekit
file-not-found
【解决方案1】:
导入
#import
#import
代替
导入/include/objc/objc-class.h>
并将部署目标更改为 7.0,它对我有用。
【解决方案2】:
是的,新的#import 确实解决了问题,但给出了新的错误
clang:错误:链接器命令失败,退出代码为 1(使用 -v 查看调用)
【解决方案3】:
您使用的是 xcode 4.3 吗?如果是,那么只需替换
#import </usr/include/objc/objc-class.h>
这个#import <objc/runtime.h>
【解决方案4】:
是的,新的#import 确实解决了问题,但给出了新的错误
file - New OAuth Web Service.m
file - /shareKit/Template Src/ShareKit/New Web Service.m
file - /shareKit/Template Src/ShareKit/New Action.m
code - `«OPTIONALHEADERIMPORTLINE»`
error - Expected identifier or '('
【解决方案5】:
问题出在线路上
#import </usr/include/objc/objc-class.h>
应该是的
#import <objc/message.h>
#import <objc/runtime.h>