找回密码
 注册
关于网站域名变更的通知
查看: 602|回复: 2
打印 上一主题 下一主题

指令集与错误Undefined symbols for architecture arm64

[复制链接]

该用户从未签到

跳转到指定楼层
1#
发表于 2020-1-16 14:07 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式

EDA365欢迎您登录!

您需要 登录 才可以下载或查看,没有帐号?注册

x

先说环境:xcode7.3.1,真机9.3.2版本、真机8.4版本1 D4 M3 @5 ]0 V: W+ l
第三方使用cocoaPods管理。
- Y! y7 m9 y" o/ R  ~报错如下图:" W; ?0 V1 p) W$ H0 r- U; i

% l2 b% a3 }& b4 {6 j

我在模拟器上设置0 S" n' F  U1 l- `1 m8 h' A
Build Active Architecture Only的debug为yes,release为NO。. W3 Y& I4 ], z
Valid architectures添加ARM64
- c6 C* d) J, [+ I模拟器和真机9.3.2版本正常。

真机8.4上报错16个错误。/ `2 @* r; r! B8 z. o! K
设置Build Active Architecture Only全NO,Valid architectures添加arm64报错同上。" ]1 L% G; b% k- `2 N6 W7 N" U2 C+ n* v$ s
设置Build Active Architecture Only的debug为yes,release为NO,
) V/ l/ O+ O9 w' B; `2 XValid architectures移除arm64只报错一个。

设置设置Build Active Architecture Only全NO2 ~! R$ S- e. d' |2 ?
Valid architectures移除arm642 C2 P( }! r: t' n) X" x
真机8.4版本正常。
9 Q; Y; M7 O* |$ l; K6 W4 [这种临时解决方法能提交AppStore吗?
* L0 n7 s/ ^+ C& S& B为什么会这么报错,有什么方法彻底解决?

在终端使用命令: find . -name *.a -exec lipo -info "{}" \;查看第三方是否支持arm64
# ]4 t. R# x( |1 \- Q" W结果如下:9 @* n$ ?; K' |5 a
Architectures in the fat file: ./Pods/JPush/lib/libjpush-ios-2.1.7.a are: armv7 armv7s i386 x86_64 arm64
" t4 S' c' w, j6 D* S/ ]Architectures in the fat file: ./xinetong/Ctrls/OfficeCtrl/AdOfficeCtrl/TempCode0525/Schedule/AgoraSDK/libagora_fat.a are: armv7 i386 x86_64 arm64
5 r: S1 W. p( u" ~( n6 `. mArchitectures in the fat file: ./xinetong/Ctrls/OfficeCtrl/AdOfficeCtrl/TempCode0525/Schedule/AgoraSDK/libagoradep_fat.a are: armv7 i386 x86_64 arm64
1 ]6 @6 M9 Z9 ZArchitectures in the fat file: ./xinetong/Ctrls/OfficeCtrl/AdOfficeCtrl/TempCode0525/Schedule/AgoraSDK/libCrasheye.a are: armv7 i386 x86_64 arm64

" g1 b: u: e3 E- m5 r& f

$ \& m; H& s! Y7 ~7 v3 i# u/ [( ?' c: N9 D  n  z( \

该用户从未签到

2#
发表于 2020-1-16 19:42 | 只看该作者

7 u7 @) w5 U7 {& {- C在项目中引入SVSegmentedControl.h/.my以及SVSSegmentedThumb.h/.m之后应用引入类,编译时候报错+ ~/ _. O% X5 P7 C& t8 q/ m
  • Undefined symbols for architecture armv6:
  •   "_OBJC_CLASS_$_SVSegmentedControl", referenced from:
  •       objc-class-ref in SVSegmentedControl.o
  • ld: symbol(s) not found for architecture armv6) o$ X8 y& j: {7 z9 e1 m
. ?. R; {* X: l- p2 y5 J
  • Undefined symbols for architecture armv6:
  •   "_OBJC_CLASS_$_SVSSegmentedThumb", referenced from:
  •       objc-class-ref in SVSSegmentedThumb.o
  • ld: symbol(s) not found for architecture armv6
    " x9 o) C  f0 u4 w* c- Y; F
6 A" v' d0 T7 W7 [) a
这种情况一般是库引用的问题,解决办法选择工程的TARGETS-->Build Phases-->Link Binary With Libraries 点击“+”图标添加对应的库。! l2 d. C0 r% \  I* M5 g
但是在此地的原因其实也是这样,编译时候找不到对应的类,所以需要我们在Build Phases-->Compile Sources中手动添加SVSegmentedControl.my以及SVSSegmentedThumb.m两项,之后clean项目,重新编译即可。
4 R, ^. |0 u8 m/ D$ y5 c" n/ f
2 u4 u9 b) c* w
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

推荐内容上一条 /1 下一条

EDA365公众号

关于我们|手机版|EDA365电子论坛网 ( 粤ICP备18020198号-1 )

GMT+8, 2025-11-25 16:37 , Processed in 0.187500 second(s), 26 queries , Gzip On.

深圳市墨知创新科技有限公司

地址:深圳市南山区科技生态园2栋A座805 电话:19926409050

快速回复 返回顶部 返回列表