Xcode 12 ld: symbol(s) not found for architecture armv64

Xcode 12.3 打包Hbuilderx的SDK包时,报以下错:

"_OBJC_CLASS_$_KSCrashReportFilterAppleFmt", referenced from:
      objc-class-ref in liblibPDRCore.a(H5CoreExceptionHandler.o)
  "_OBJC_CLASS_$_KSCrash", referenced from:
      objc-class-ref in liblibPDRCore.a(H5CoreExceptionHandler.o)
  "_OBJC_CLASS_$_KSCrashInstallationStandard", referenced from:
      objc-class-ref in liblibPDRCore.a(H5CoreExceptionHandler.o)
ld: symbol(s) not found for architecture armv64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

跟据查询的资料,发现不缺少liblibPDRCore.aliblibPDRCore.a的依赖都在。后来发现了下面的资料,就解决了编译报错。

Xcode 12不再支持VALID_ARCHS,需移除!采用Excluded Architectures过滤掉不需要的架构即可!

如果项目在Build Settings下的User-Defined中添加了VALID_ARCHS属性,需要将其移除,否则无法在Xcode 12编译运行设备。

如果确实需要设定支持/不支持的架构,通过Excluded Architectures配置即可。

猜你喜欢

转载自blog.csdn.net/weixin_42602900/article/details/126155518