Xcode:未找到架构armv7的符号

时间:2012-09-20 23:57:07

标签: ios xcode

我收到了来自Xcode的消息

Ld /Users/myUsername/Library/Developer/Xcode/DerivedData/myApp-gqsubryokdmrjmczxeqypzcgpths/Build/Intermediates/myApp.build/Debug-iphoneos/myApp.build/Objects-normal/armv7/myApp normal armv7
    cd /Users/myUsername/Documents/_IPAD/myApp
    setenv IPHONEOS_DEPLOYMENT_TARGET 4.3
    setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"


/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk -L/Users/myUsername/Library/Developer/Xcode/DerivedData/myApp-gqsubryokdmrjmczxeqypzcgpths/Build/Products/Debug-iphoneos -F/Users/myUsername/Library/Developer/Xcode/DerivedData/myApp-gqsubryokdmrjmczxeqypzcgpths/Build/Products/Debug-iphoneos -filelist /Users/myUsername/Library/Developer/Xcode/DerivedData/myApp-gqsubryokdmrjmczxeqypzcgpths/Build/Intermediates/myApp.build/Debug-iphoneos/myApp.build/Objects-normal/armv7/myApp.LinkFileList -dead_strip -fobjc-arc -fobjc-link-runtime -miphoneos-version-min=4.3 -framework AudioToolbox -framework SystemConfiguration -framework QuartzCore -framework OpenAL -framework CoreGraphics -framework CFNetwork -framework MessageUI -framework CoreData -framework AVFoundation -framework StoreKit -framework UIKit -framework Foundation -o /Users/myUsername/Library/Developer/Xcode/DerivedData/myApp-gqsubryokdmrjmczxeqypzcgpths/Build/Intermediates/myApp.build/Debug-iphoneos/myApp.build/Objects-normal/armv7/myApp



Undefined symbols for architecture armv7:
  "_OBJC_CLASS_$_ViewController", referenced from:
      objc-class-ref in AppDelegate.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)

到底发现了什么?如果说找不到某些东西,那么找不到这些东西?或者换句话说,如果xcode正在搜索它正在某处搜索的内容,在哪里以及在哪里搜索?

3 个答案:

答案 0 :(得分:10)

找不到ViewController对象,并在AppDelegate中引用了该对象。您没有将ViewController链接到您的应用程序。检查项目Compile Sources中的Build Phases部分是否显示ViewController.m

enter image description here

答案 1 :(得分:1)

我刚碰到这个。结果我没有将新源添加到需要它的所有目标。也许这将有助于未来的人.. :))

答案 2 :(得分:0)

将xCode 6beta更新为xCode 6.0.1后,我遇到了同样的错误。花了很多时间后我通过从窗口 - >中删除“派生数据”来修复它。组织者 - >项目 - > #选择项目#,然后在“派生数据”中按下删除。