ios - Xcode:找不到体系结构 armv7 的符号

标签 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 正在搜索它正在某处搜索的东西,在哪里搜索什么?

最佳答案

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

enter image description here

关于ios - Xcode:找不到体系结构 armv7 的符号,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12522571/

相关文章:

ios - 应用程序未运行时不会收到远程通知

ios - 在 XCode UI 测试中等待所有 HTTP 请求完成?

iOS——我可以访问用户的图书库吗?

iphone - 我希望今天支持哪些 iOS 版本?

ios - 将 iAd 设置在屏幕顶部

ios - 为什么 Dispatch_group_notify 在不同的环境下工作不同?

ios - 更新到 Xcode 10.2 后 : Invalid Toolchain error when trying to submit app to App Store

ios - 归档后无法导出开发的iOS应用程序

iphone - 如何在 ios 中切换隐藏和查看密码?

ios - Objective-C:for循环没有执行?