在文件中缺少必需的架构armv7? [英] missing required architecture armv7 in file?

查看:98
本文介绍了在文件中缺少必需的架构armv7?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直收到此警告,任何人都可以提供错误帮助吗?

I keep getting this warning and errors can anyone help?

    ld: warning: ignoring file /Applications/Xcode.app/Contents/Developer/Platforms       /iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/System/Library/Frameworks//SystemConfiguration.framework/SystemConfiguration, missing required architecture armv7 in file
    Undefined symbols for architecture armv7:
    "_SCNetworkReachabilityCreateWithAddress", referenced from:
  +[Reachability reachabilityWithAddress:] in Reachability.o
   "_SCNetworkReachabilityCreateWithName", referenced from:
  +[Reachability reachabilityWithHostName:] in Reachability.o
   "_SCNetworkReachabilityUnscheduleFromRunLoop", referenced from:
  -[Reachability stopNotifier] in Reachability.o
   "_SCNetworkReachabilityScheduleWithRunLoop", referenced from:
  -[Reachability startNotifier] in Reachability.o
   "_SCNetworkReachabilitySetCallback", referenced from:
  -[Reachability startNotifier] in Reachability.o
   "_SCNetworkReachabilityGetFlags", referenced from:
  -[Reachability connectionRequired] in Reachability.o
  -[Reachability currentReachabilityStatus] in Reachability.o
   ld: symbol(s) not found for architecture armv7
   clang: error: linker command failed with exit code 1 (use -v to see invocation)

我的应用程序在模拟器中正常工作我没有得到这个就是当我构建到手机时。

My app workings fine in the Simulator I don't get this it is just when I build to the phone.

推荐答案

您需要链接SystemConfiguration框架。在Xcode的项目导航器中选择您的项目,选择您的应用目标,然后选择Build Phases选项卡。在Link Binary With Libraries下,单击+按钮并选择SystemConfiguration.framework。

You need to link against the SystemConfiguration framework. Select your project in Xcode's project navigator, select your app target, and select the Build Phases tab. Under Link Binary With Libraries, click on the "+" button and choose SystemConfiguration.framework.

您可能需要以相同的方式添加其他框架依赖项,但添加SystemConfiguration是为我修复了相同的错误。

There may be other framework dependencies that you need to add in the same way, but adding SystemConfiguration is what fixed the same errors for me.

ETA:我直接跳到了错误,并没有看到粘贴顶部的ld警告。如果您已经链接到SystemConfiguration,可能尝试删除并重新添加它,如果所有其他方法都失败,请更新Xcode。最新版本肯定具有正确的架构,所以对我来说听起来好像你的项目在错误的位置或框架本身的错误。

ETA: I jumped right to the errors and didn't see the ld warning at the top of the paste. If you're already linking to SystemConfiguration, maybe try removing and re-adding it, and if all else fails, update Xcode. The most recent release definitely has the right architecture, so it sounds to me like either your project is looking in the wrong place or something's wrong with the framework itself.

这篇关于在文件中缺少必需的架构armv7?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆