objective-c - Swift 项目中带有 .a 库 Xcode 的体系结构 arm64 的 undefined symbol

标签 objective-c c swift xcode

我有一个静态 C 库 ohNetCoreFatEntotem.a,我已将其导入到最初用 ObjctiveC 编写的现有项目中。现在该项目几乎是 Swift。

当我尝试构建项目时出现以下错误:

enter image description here

该库是为 arm64、armv7 和 x86 编译的 fat 库

这个错误是什么意思?

谢谢

已编辑 我可能对编译器和库没有足够深入的了解……抱歉。

我已经从 https://github.com/openhome/ohNet 构建了一个库我生成了压缩文件,就像你可以找到的一样 Here .

结构是:

enter image description here

我创建了一个 Fat 库,其中包含来自不同结构的所有 fileLib.a,也可以找到 Here .

我创建了一个包含胖库和标题的文件夹。 enter image description here

如何在 xcode 中声明它们?

最佳答案

来自 HERE ,下面以摘要形式显示了两个主要主题(可能与您所看到的内容相关)。转到链接页面以获取有关该主题的更多详细信息。 (Embarcadero 是 Borland 特有的,但本教程中的大部分信息普遍适用)

UNDEFINED SYMBOL AT COMPILE TIME
An undefined symbol at compile time indicates that the named identifier was used in the named source file, but had no definition in the source file. This is usually caused by a misspelled identifier name, or missing declaration of the identifier used. (examples follow)

或者

UNDEFINED SYMBOL AT LINK TIME
When linking multi-file projects, the linker must resolve all references to functions and global variables shared between modules. When these references cannot be resolved, the linker generates an "undefined symbol" error message. This means that after searching all of the object files and libraries which are included in the link, the linker was unable to find a declaration for the identifier you were using. This can be caused by... (read more...)

关于objective-c - Swift 项目中带有 .a 库 Xcode 的体系结构 arm64 的 undefined symbol ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50966719/

相关文章:

ios - 对象框架在运行时缩放,但保留恒定值,使得以编程方式放置项目变得困难/不准确

objective-c - 从坐标的 NSArray 在 MKMapView 上添加 MKAnnotations

c++ - 浮点转换和性能

c - 我在使用 calloc 创建处理矩阵的函数时遇到问题

swift - 在 Swift 中对嵌套自定义对象的值求和

ios - 当我取消添加到弹出窗口中的联系人时 UItextView 崩溃

iphone - 如何确定 ViewController 是否是顶级的?

c++ - 带中断的互斥安全(嵌入式固件)

swift - 如何为 Xib 设置单元格动态高度的约束...?

ios - skemitternode 与 skspritenode 的碰撞