Undefined symbols for architecture armv7:
"_OBJC_METACLASS_$_MWPhotoBrowser", referenced from:
_OBJC_METACLASS_$ _** in **.o
_OBJC_METACLASS_$_** in **.o
"_OBJC_CLASS_$_MWPhotoBrowser", referenced from:
_OBJC_CLASS_$_** in **.o
_OBJC_CLASS_$_** in **.o
"_OBJC_CLASS_$_MWPhoto", referenced from:
objc-class-ref in **.o
objc-class-ref in **.o
"_OBJC_CLASS_$_MBProgressHUD", referenced from:
objc-class-ref in BaseViewController.o
objc-class-ref in MBProgressHUD+CustomHUD.o
l_OBJC_$_CATEGORY_MBProgressHUD_$_CustomHUD in MBProgressHUD+CustomHUD.o
objc-class-ref in **.o
objc-class-ref in **.o
"_OBJC_CLASS_$_Reachability", referenced from:
objc-class-ref in Reachability+Ext.o
l_OBJC_$_CATEGORY_Reachability_$_Ext in Reachability+Ext.o
objc-class-ref in AppDelegate.o
objc-class-ref in **.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
一个测试完好的项目我复制出来放到一个新的文件夹中,然后更新了下cocoapods 就出现这个问题.
路径没有设置绝对路径,库都是在文件夹中.检查了没有重复文件,重复导入.可以说没改任何设置.但是就是这么一复制,就报错了.
解决方案:
Xcode直接clean应该是没有删掉项目索引之类的,我直接找到DerivedData,把里面所有文件夹都给清理了,再编译就好了
PS:
DerivedData
影响:可重新生成;会删除build生成的项目索引、build输出以及日志。重新打开项目时会重新生成,大的项目会耗费一些时间。
路径:~/Library/Developer/Xcode/DerivedData