美文网首页
Realm静态库提示编译出错

Realm静态库提示编译出错

作者: KevinTing | 来源:发表于2016-10-11 23:22 被阅读238次

根据官方文档,加入realm.framework静态库到工程之后,编译,有可能提示如下错误:

Undefined symbols for architecture arm64:
  "_inflate", referenced from:
      realm::util::compression::inflate(char const*, unsigned long, char*, unsigned long) in Realm(compression-iphoneos.o)
  "_deflate", referenced from:
      realm::util::compression::deflate(char const*, unsigned long, char*, unsigned long, unsigned long&, int) in Realm(compression-iphoneos.o)
  "_inflateEnd", referenced from:
      realm::util::compression::inflate(char const*, unsigned long, char*, unsigned long) in Realm(compression-iphoneos.o)
  "_deflateInit_", referenced from:
      realm::util::compression::deflate_bound(char const*, unsigned long, unsigned long&, int) in Realm(compression-iphoneos.o)
      realm::util::compression::deflate(char const*, unsigned long, char*, unsigned long, unsigned long&, int) in Realm(compression-iphoneos.o)
  "_deflateBound", referenced from:
      realm::util::compression::deflate_bound(char const*, unsigned long, unsigned long&, int) in Realm(compression-iphoneos.o)
      realm::util::compression::deflate(char const*, unsigned long, char*, unsigned long, unsigned long&, int) in Realm(compression-iphoneos.o)
  "_inflateInit_", referenced from:
      realm::util::compression::inflate(char const*, unsigned long, char*, unsigned long) in Realm(compression-iphoneos.o)
  "_deflateEnd", referenced from:
      realm::util::compression::deflate_bound(char const*, unsigned long, unsigned long&, int) in Realm(compression-iphoneos.o)
      realm::util::compression::deflate(char const*, unsigned long, char*, unsigned long, unsigned long&, int) in Realm(compression-iphoneos.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

那么加入库"libz.tbd"即可解决问题,官方文档并没有提示要加这个库。

相关文章

  • Realm静态库提示编译出错

    根据官方文档,加入realm.framework静态库到工程之后,编译,有可能提示如下错误: 那么加入库"libz...

  • VC++编译日记

    编译工具:Virtual Studio 2019一、静态库编译提示 error LNK1112: 模块计算机类型“...

  • 编译glew的静态库时出错

    没有得到静态库,得到的是glew32d.lib后缀d可能是dynamic按照opengl的教程,应该使用静态库,也...

  • gcc 链接器工作原理

    问题 在编译源代码为可执行文件的时候,如果需要链接静态库,我们可能会遇到如下错误提示: 编译出现了失败,提示找不到...

  • 静态库

    静态库 静态库动态库简介 .a 静态库:被编译好的二进制文件 静态库:.a, .framework 动态库: .d...

  • iOS开发-动态库加载(实时模块更新)

    动态库和静态库 静态库和动态库是相对编译期和运行期:静态库在程序编译时会被链接到目标代码中,程序运行时将不再需要改...

  • iOS 静态库Framework开发(包含静态库,bundle使

    静态库和动态库 静态库和动态库是相对编译期和运行期的:静态库在程序编译时会被链接到目标代码中,程序运行时将不再需要...

  • Android ABI想到的

    缘起 最近在项目中用到了realm,引起项目编译找不到so库,原来是realm的多版本so库所导致的。所以,解铃还...

  • iOS静态库和动态库的区别

    iOS开发中静态库和动态库区别: 静态库和动态库是相对编译期和运行期的:静态库在程序编译时会被链接到目标代码中,程...

  • iOS静态库和动态库的使用

    iOS开发中静态库和动态库区别 静态库和动态库是相对编译期和运行期的:静态库在程序编译时会被链接到目标代码中,程序...

网友评论

      本文标题:Realm静态库提示编译出错

      本文链接:https://www.haomeiwen.com/subject/vqobyttx.html