iphone – 架构armv7的未定义符号:“_SCNetworkReachabilityCreateWithAddress”

iphone – 架构armv7的未定义符号:“_SCNetworkReachabilityCreateWithAddress”,第1张

概述对,这已成为一种正确的痛苦我现在已经看了2天,似乎无法解决它.这是我得到的错误. Undefined symbols for architecture armv7:"_SCNetworkReachabilityCreateWithAddress", referenced from: +[Reachability reachabilityWithAddress:] in Reachabilit 对,这已成为一种正确的痛苦我现在已经看了2天,似乎无法解决它.这是我得到的错误.

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.old: symbol(s) not found for architecture armv7clang: error: linker command Failed with exit code 1 (use -v to see invocation)

我添加了SystemConfiguration.framework,它似乎不想对它做任何事情,因为这个错误不会消失.我已经看了很多同样的问题,但很多都做了确认任何答案.这种刚刚在周末没有人碰过它的时候发展起来的.谁能帮忙.

编辑
忘了添加这个位.

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

编辑

对@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

你应该看到这样的输出:

Architectures in the fat file: SystemConfiguration are: armv6 armv7

如果不这样做,您的项目可能已设置为链接到SystemConfiguration.framework的错误版本.您的计算机上有该框架的多个版本.因此,我将验证您在项目中的框架(即SystemConfiguration)的路径.

通常,我希望该文件是这样的(根据您正在使用的 *** 作系统版本进行调整):

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

以上是内存溢出为你收集整理的iphone – 架构armv7的未定义符号:“_SCNetworkReachabilityCreateWithAddress”全部内容,希望文章能够帮你解决iphone – 架构armv7的未定义符号:“_SCNetworkReachabilityCreateWithAddress”所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/web/1067479.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-05-26
下一篇2022-05-26

发表评论

登录后才能评论

评论列表(0条)

    保存