架构armv7的未定义符号:“_SCNetworkReachabilityCreateWithAddress” [英] Undefined symbols for architecture armv7: "_SCNetworkReachabilityCreateWithAddress"

查看:144
本文介绍了架构armv7的未定义符号:“_SCNetworkReachabilityCreateWithAddress”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对,这已经成为一种正确的痛苦,我已经看了两天了,似乎无法解决它。这是我得到的错误。

架构armv7的未定义符号:
_SCNetworkReachabilityCreateWithAddress,引用自:
+ [Reachability reachabilityWithAddress:] in Reachability.o
_SCNetworkReachabilityCreateWithName,引用自:
+ [Reachability reachabilityWithHostName:] in Reachability.o
_SCNetworkReachabilityUnscheduleFromRunLoop,引用自:
- Reachability.o中的[Reachability stopNotifier]。
_SCNetworkReachabilityScheduleWithRunLoop,引用自:
- Reachability.o中的[Reachability startNotifier]。
_SCNetworkReachabilitySetCallback ,引用自:
- Reachability.o中的[Reachability startNotifier]。
_SCNetworkReachabilityGetFlags,引用自:
- Reachability.o中的[Reachability connectionRequired]。
- [Reachability currentReachabilityStatus]在Reachability.o
ld:符号(s)找不到架构armv7
部落g:error:linker命令失败,退出代码1(使用-v查看调用)

我有添加了 SystemConfiguration.framework ,它似乎不想对它做任何事情,因为此错误不会消失。我看了很多相同的问题,但很多人都确认了任何答案。这种刚刚在周末没有人碰过它时发展起来。任何人都可以提供帮助。



编辑
忘记补充这一点。

< blockquote>

ld:warning:忽略文件/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/System/Library/Frameworks//SystemConfiguration .framework / SystemConfiguration,在文件中缺少必需的体系结构armv7


$ b 编辑



Right感谢@gaige,我发现了一个问题;在SystemConfiguration.framework之前有一个额外的斜杠,不应该在那里。我已经删除了框架并重新添加,但没有帮助。如何删除这个额外的斜杠?

解决方案

通常情况下,额外的斜杠不会将一个斜杠类似于UNIX的构建过程。



但是,您确实需要确保 armv7 架构位于构建尝试构建的框架文件中使用。为此,请在命令行使用 lipo -info 命令:

  lipo -info /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/System/Library/Frameworks//SystemConfiguration.framework/Sy stemConfiguration 

您应该看到如下输出:

 胖文件中的体系结构:SystemConfiguration是:armv6 armv7 

如果不不,你的项目可能被设置为链接到SystemConfiguration.framework的错误版本。你的机器上有多个版本的框架。所以,我会验证你的项目中的框架路径(即SystemConfiguration)。



通常情况下,我希望该文件是这样的(调整对于您使用的操作系统版本):

  /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0 .sdk / System / Lib rary / Frameworks / SystemConfiguration.framework 


Right this has become a right pain I have been looking at it for 2 days now and can't seem to solve it. Here is the error I am getting.

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)

I have added SystemConfiguration.framework and it doesn't seem to want to do anything with it as this error just won't go away. I have looked at quite a few of the same problem but a lot of them done confirm any answers. This kind of just developed over the weekend when no one had touched it. Can anyone help.

EDIT Forgot to add this bit.

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

EDIT

Right Thanks to @gaige I have found a problem; there is an extra slash just before SystemConfiguration.framework that shouldn't be there. I have removed the framework and re-added and that has not helped. How can I remove this extra slash?

解决方案

Normally, extra slashes won't muck up a UNIX-like build process.

But, you do need to make sure the armv7 architecture is inside the framework file that your build is trying to use. To do this, use the lipo -info command at the command line:

lipo -info /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer‌​/SDKs/iPhoneOS5.1.sdk/System/Library/Frameworks//SystemConfiguration.framework/Sy‌​stemConfiguration

You should see output like this:

Architectures in the fat file: SystemConfiguration are: armv6 armv7

If you don't, your project is probably set up to link to the wrong version of the SystemConfiguration.framework. There's multiple versions of that framework on your machine. So, I would verify the path of the framework (i.e. SystemConfiguration) that you have in your project.

Normally, I would expect that file to be something like this (adjusted for the OS version you're using):

/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk/System/Lib‌​rary/Frameworks/SystemConfiguration.framework

这篇关于架构armv7的未定义符号:“_SCNetworkReachabilityCreateWithAddress”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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