ios - 使用 .framework 时出现问题,其中包含 .a 静态库

标签 ios static-libraries ios-frameworks

我有 .framework 文件,该文件在包含另一个 .a/.framework 文件之前可以正常工作。

我的框架构建成功,但在将我的 .framework 文件添加到另一个项目后,它无法正常工作。

在我的框架构建阶段添加其他 .a.framework 文件后,出现此错误。

0  0x103014342  __assert_rtn + 144
1  0x10307d28e  ld::tool::OutputFile::addressOf(ld::Internal const&, ld::Fixup const*, ld::Atom const**) + 262
2  0x10307ef54  ld::tool::OutputFile::applyFixUps(ld::Internal&, unsigned long long, ld::Atom const*, unsigned char*) + 3712
3  0x103083693  ld::tool::OutputFile::writeAtoms(ld::Internal&, unsigned char*) + 489
4  0x10307c59e  ld::tool::OutputFile::writeOutputFile(ld::Internal&) + 818
5  0x10307669c  ld::tool::OutputFile::write(ld::Internal&) + 178
6  0x1030151c0  main + 1164
7  0x7fff8d04c5ad  start + 1
A linker snapshot was created at:
/tmp/SDKsIntegrated_Test-2016-03-01-190200.ld-snapshot
ld: Assertion failed: (_mode == modeFinalAddress), function finalAddress, file /Library/Caches/com.apple.xbs/Sources/ld64/ld64-253.9/src/ld/ld.hpp, line 749.
clang: error: linker command failed with exit code 1 (use -v to see invocation)

在添加其他 .a.framework 文件之前请注意它正在工作。

注意:我正在做与 appodeal.com 几乎相同的事情。 感谢社区。

最佳答案

如前所述here ,通过将“ strip 样式”从“所有符号”更改为“非全局符号”解决了同样的问题,允许在类别中使用全局符号。

关于ios - 使用 .framework 时出现问题,其中包含 .a 静态库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36358264/

相关文章:

ios - 如何解决警告: "Unsupported Configuration: Tab Bar Controller NIB Name set to MainWindow.nib"?

ios - Xcode 在代码签名身份中看不到我的开发人员证书

c++ - 在 Qt Creator 中使用静态库

objective-c - 即使在删除 x86_64 要求后仍缺少所需的体系结构 x86_64

iphone - 如何找到/获取 CoreMedia.framework 并开始使用它?

ios - 无法符合 FBSDKSharingDelegate

c++ - GDB 不显示对象的成员

ios - 对使用 faSTLane 构建的应用程序进行代码签名,并将 CocoaPods 构建为动态框架

iOS 将预处理器宏从主项目传递到嵌入式框架

javascript - 在 IOS 设备上填充快速类型栏选项