错误的是第三方文件
ld: warning: ignoring file /Users/mybook/stockproject/StockPro/Contents/Stock_H5SDK/libQuoteWidget/libQuoteWidget.a, missing required architecture i386 in file /Users/mybook/stockproject/StockPro/Contents/Stock_H5SDK/libQuoteWidget/libQuoteWidget.a (3 slices)
Undefined symbols for architecture i386:
"_OBJC_METACLASS_$_HLStock", referenced from:
_OBJC_METACLASS_$_BaseStockModel in BaseStockModel.o
"_OBJC_CLASS_$_HLFinancialItem", referenced from:
objc-class-ref in H5DataCenter.o
"_OBJC_CLASS_$_HLMarket", referenced from:
objc-class-ref in H5DataCenter.o
"_OBJC_CLASS_$_HLDealDetails", referenced from:
objc-class-ref in H5DataCenter.o
"_OBJC_CLASS_$_HLStockTrendData", referenced from:
objc-class-ref in H5DataCenter.o
"_OBJC_CLASS_$_HLTradeTime", referenced from:
objc-class-ref in H5DataCenter.o
"_OBJC_CLASS_$_HLPriceVolumeItem", referenced from:
objc-class-ref in H5DataCenter.o
"_OBJC_CLASS_$_HLStockTrendItem", referenced from:
objc-class-ref in H5DataCenter.o
"_OBJC_CLASS_$_HLTypeItem", referenced from:
objc-class-ref in H5DataCenter.o
"_OBJC_CLASS_$_HLStockTickItem", referenced from:
objc-class-ref in H5DataCenter.o
"_OBJC_CLASS_$_HLStockKlineItem", referenced from:
objc-class-ref in H5DataCenter.o
objc-class-ref in StockKlineBaseViewsController.o
"_OBJC_CLASS_$_HLRealtime", referenced from:
objc-class-ref in BaseStockController.o
objc-class-ref in H5DataCenter.o
"_OBJC_CLASS_$_HLStock", referenced from:
objc-class-ref in H5DataCenter.o
objc-class-ref in StockKlineBaseViewsController.o
_OBJC_CLASS_$_BaseStockModel in BaseStockModel.o
objc-class-ref in MyselfStockController.o
"_OBJC_CLASS_$_HLQuoteUtils", referenced from:
objc-class-ref in BaseStockController.o
objc-class-ref in H5DataCenter.o
"_OBJC_CLASS_$_HLQuoteFormatUtils", referenced from:
objc-class-ref in BaseStockController.o
objc-class-ref in H5DataCenter.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
我的情况是这样的 , 搞定!!!! 每个人出现这种情况的问题可能不一样 , 方法可能也不同
如果再出现这种编译报错 , 先看看是自己写的文件 , 还是第三方文件
1 . 可能是这个文件未导入 , 编译器引用不到
2 . 看看是不是Bitcode设置问题
3 . 看看是不是Build Active Architecture Only问题
有可能因为设备不支持