Undefined symbols for architecture armv7错误解决方法
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Undefined symbols for architecture armv7错误解决方法相关的知识,希望对你有一定的参考价值。
Undefined symbols for architecture armv7:
"_OBJC_CLASS_$_BriefMainModel", referenced from:
objc-class-ref in BriefMainViewController.o
"_OBJC_CLASS_$_DDXMLDocument", referenced from:
objc-class-ref in BriefDetailViewController.o
objc-class-ref in BriefMainViewController.o
"_OBJC_CLASS_$_BriefDetailModel", referenced from:
objc-class-ref in BriefDetailViewController.o
"_OBJC_CLASS_$_MKNetworkEngine", referenced from:
objc-class-ref in BriefDetailViewController.o
objc-class-ref in BriefMainViewController.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Undefined symbols for architecture i386:
“_OBJC_CLASS_$_XXX”, referenced from:
objc-class-ref in XXX
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
如果真机调试就是 undefined symbols for architecture armv7错误!
发生这种错误通常是project.pbxproj这个文件引起的,尤其在多人合作开发的时候,svn提交不规范可能导致project.pbxproj发生错误,导致文件的引用不在project.pbxproj文件中。
xcode项目import文件会根据project.pbxproj来查找,查找不到文件的引用则会有上述的错误。
解决方法点击工程,在主界面中点击Build Phases,根据提示信息“XXX”来判断缺少什么文件,一般如果缺少自定义的文件,Complie Sources下没有XXX文件,那么就在Complie Sources中加入该文件。如果缺少类库,则在Link Binary With Libraries中加入该类库。
以上是关于Undefined symbols for architecture armv7错误解决方法的主要内容,如果未能解决你的问题,请参考以下文章
Undefined symbols for architecture arm64:问题
Undefined symbols for architecture armv7错误解决方法
Undefined symbols for architecture xxx,出错总结
Cocoapods Undefined symbols for architecture armv7sarm64