天天看點

使用.a檔案遇到的錯誤

導入第三方庫的時候如果遇到  ld: warning: ignoring file 的警告和Undefined symbols for architecture arm64 :”_OBJC_CLASS_$_xx檔案名", referenced from:的錯誤,可能是.a檔案根本就不支援arm64指令集,也有可能是.a檔案未導入,或者link路徑不對

判斷.a檔案支援那些指令集的方法:

打開終端輸入cd到.a檔案所在的檔案夾 ,之後回車 , 輸入ls 回車,确認是否是目前.a所在位置,

确定好之後輸入指令 sudo lipo -info ***.a 之後回車,終端會提示需要輸入密碼(電腦密碼即可),回車,如果出現如下内容:

Architectures in the fat file: ***.a are: armv7s armv7 i386 x86_64 arm64 

說明***.a 支援 armv7s armv7 i386 x86_64 arm64  這些,是以可以放心使用到項目中。

參考:

http://blog.csdn.net/azhou_hui/article/details/18312047

http://www.mamicode.com/info-detail-511489.html