Undefined symbols for architecture armv7錯誤解決方法

Undefined symbols for architecture armv7:xcode

  "_OBJC_CLASS_$_BriefMainModel", referenced from:svn

      objc-class-ref in BriefMainViewController.oui

  "_OBJC_CLASS_$_DDXMLDocument", referenced from:spa

      objc-class-ref in BriefDetailViewController.o調試

      objc-class-ref in BriefMainViewController.ocode

  "_OBJC_CLASS_$_BriefDetailModel", referenced from:開發

      objc-class-ref in BriefDetailViewController.oit

  "_OBJC_CLASS_$_MKNetworkEngine", referenced from:io

      objc-class-ref in BriefDetailViewController.oclass

      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中加入該類庫。

相關文章
相關標籤/搜索