swift相关项目包含私有库引起的Undefined symbols for architecture arm64

简介: swift相关项目包含私有库引起的Undefined symbols for architecture arm64

纯OC项目默认不设置use_frameworks!,swift项目必须设置use_frameworks!。

一般的私有库为了便于修改,大都是使用源码设计不生成framework库,若不使用use_frameworks!,项目编译时,都是生成.a文件。大家都知道.a库文件可以采用#import "BITLogMacro.h"方式引入其它库的头文件,而framework库需要采用#import <DYSingleObject/BITSingleObject.h>方式访问其它库的头文件。造成私有库可能无法在swift项目或含有swift项目中使用。不然包找不到头文件的如下错误:

Undefined symbols for architecture arm64:
  "_OBJC_CLASS_$_BITSingleObject", referenced from:
      objc-class-ref in BITNSObject.o
  "_bitLogLevel", referenced from:
      -[BITNSObject configLog] in BITNSObject.o
      +[BITNSObject initialize] in BITNSObject.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

目录
相关文章
|
4月前
|
机器学习/深度学习 人工智能 计算机视觉
好的资源-----打卡机+Arm+Qt+OpenCV嵌入式项目-基于人脸识别的考勤系统-----B站神经网络与深度学习,商城
好的资源-----打卡机+Arm+Qt+OpenCV嵌入式项目-基于人脸识别的考勤系统-----B站神经网络与深度学习,商城
|
5月前
|
Ubuntu 编译器 C语言
蓝易云 - ubuntu上安装boost库为SOMEIP的X86和ARM下编译做准备(编译两种版本)
以上就是在Ubuntu上安装Boost库并为SOME/IP的X86和ARM架构编译做准备的全部步骤。
73 0
|
6月前
|
Swift Perl
OC和swift混合工程更新库时报:target has transitive dependencies that include statically linked binaries
OC和swift混合工程更新库时报:target has transitive dependencies that include statically linked binaries
97 0
|
6月前
|
Swift
use_frameworks引起的Undefined symbols for architecture arm64
use_frameworks引起的Undefined symbols for architecture arm64
56 0
|
6月前
|
iOS开发
部分库不支持32位系统archive报错:Undefined symbols for architecture armv7
部分库不支持32位系统archive报错:Undefined symbols for architecture armv7
49 0
|
5月前
|
前端开发 小程序 JavaScript
微信小程序-Unhandled promise rejection TypeError: Cannot read property ‘get‘ of undefined
微信小程序-Unhandled promise rejection TypeError: Cannot read property ‘get‘ of undefined
|
3月前
|
存储 JavaScript 前端开发
成功解决:Cannot read properties of undefined (reading ‘commit‘)
这篇文章提供了解决Vuex中"Cannot read properties of undefined (reading 'commit')"错误的两种方法:检查模板中的数据属性是否存在,以及确保在Vue实例中正确挂载了store对象。
成功解决:Cannot read properties of undefined (reading ‘commit‘)
|
3月前
|
定位技术 Apache
Echarts——Invalid geoJson format Cannot read property 'length' of undefined
Echarts——Invalid geoJson format Cannot read property 'length' of undefined
82 0
|
3月前
|
JavaScript
VUE——filemanager-webpack-plugin报错TypeError: Cannot read property 'isFile' of undefined
VUE——filemanager-webpack-plugin报错TypeError: Cannot read property 'isFile' of undefined
70 0
|
3月前
|
前端开发 JavaScript
VUE——Uncaught (in promise) TypeError: Cannot read property '__esModule' of undefined
VUE——Uncaught (in promise) TypeError: Cannot read property '__esModule' of undefined
55 0