【发布时间】:2015-06-18 21:03:44
【问题描述】:
lipo -info libXxxx.a fat文件:libXxxx.a中的架构是:armv7 i386 arm64
但是依赖项目中的编译器给出了链接错误,
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_ClassXXXX", referenced from:
objc-class-ref in AppDelegate.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
我错过了什么吗? 所有 lib 项目的目标都有架构:标准架构(armv7,arm64) 和有效架构 arm64、armv7、armv7s
在制作通用二进制文件时,在我的 lipo 命令中,我正在从 iphonesimulator 和 iphoneos 文件夹中进行 lipo-ing。
【问题讨论】:
-
因为您同时为 iphonesimulator 和 iphoneos 文件夹创建 fat 文件是正确的,但它不支持 x86_64 架构,请参阅发布的答案
标签: ios static-libraries universal-binary