XCode 4 中的 PLCrashReporter - 无法在模拟器中编译
我一定在这里做了一些完全愚蠢的事情,但我无法将 PLCrashReporter 框架包含在我的项目中。以下是我获取框架的步骤:
- 从 google code 上的官方项目网站下载 .dmg 文件
- 将 CrashReporter.framework 文件夹复制到我的项目的根目录
- 通过转到我的项目,选择目标来添加框架,转到“构建阶段”选项卡,打开“链接二进制文件与库”部分,单击加号,然后添加 CrashReporter.framework 文件夹,
将框架拉入类文件中
我将使用#import
当我尝试在 4.3 模拟器下编译时,出现以下错误:
Undefined keywords for Architecture i386: “_OBJC_CLASS_$_PLCrashReporter”,引用自: AppDelegate+CrashReporting.o 中的 objc-class-ref “_OBJC_CLASS_$_PLCrashReport”,引用自: AppDelegate+CrashReporting.o 中的 objc-class-ref ld:未找到架构 i386 的符号 clang:错误:链接器命令失败,退出代码为1(使用-v查看调用)
当我在设备下编译时,一切都很好。我需要包含某种标头或库搜索路径吗?
该应用程序在 XCode 3 下编译,在所有配置下都没有问题。
I must be doing something totally stupid here, but I can't get the PLCrashReporter framework included in my project. Here are the steps I took to get the framework:
- Downloaded the .dmg file from the official project site on google code
- Copied the CrashReporter.framework folder to the root directory of my project
- Added the framework by going to my project, selecting the target, going to the Build Phases tab, opening the Link Binary With Libraries section, clicking the plus sign, and adding the CrashReporter.framework folder
I am pulling in the framework in my class file by using
#import <CrashReporter/CrashReporter.h>
When I try to compile under 4.3 simulator, I get the following errors:
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_PLCrashReporter", referenced from:
objc-class-ref in AppDelegate+CrashReporting.o
"_OBJC_CLASS_$_PLCrashReport", referenced from:
objc-class-ref in AppDelegate+CrashReporting.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
When I compile under the device, everything is fine. Is there some sort of header or library search path I need to include?
The app compiles under XCode 3 without issues under all configurations.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
不要忘记包括
“链接二进制文件与库”中的
Don't forget to include
in "Link Binary With Libraries".
我有同样的问题并且能够解决它。以下是我完成的步骤...
我希望这有帮助。
I had the same issue and was able to resolve it. Here are the steps I completed...
I hope this helps.
对于寻找此信息的其他人:
我遵循了上面给出的相同步骤,但出现了错误。我删除了静态库,只包含框架(您可以从他们的 dmg 中获取)。
它对我来说非常有效。我认为通过构建项目来创建静态库的过程很旧(在他们创建框架之前)。
谢谢。
For anyone else looking for this information:
I followed the same steps given above however I was getting errors. I deleted the static library and only included the framework (which you can get from their dmg).
It worked perfectly for me. I think the process of creating static library by building the project was old (before they created a framework).
Thanks.