iphone – 架构armv7的未定义符号:“_SCNetworkReachabilityCre
对,这已成为一种正确的痛苦我现在已经看了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.o ld: symbol(s) not found for architecture armv7 clang: error: linker command failed with exit code 1 (use -v to see invocation) 我添加了SystemConfiguration.framework,它似乎不想对它做任何事情,因为这个错误不会消失.我已经看了很多同样的问题,但很多都做了确认任何答案.这种刚刚在周末没有人碰过它的时候发展起来的.谁能帮忙. 编辑
编辑 对@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 (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |