是的,这已成为一种正确的痛苦,我已经看了 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,它似乎不想用它做任何事情,因为这个错误不会消失。我已经看过很多相同的问题,但其中很多确实证实了任何答案。这种是周末才发展起来的,没人碰过。任何人都可以帮忙。
编辑 忘记添加这个位。
ld:警告:忽略文件/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/System/Library/Frameworks//SystemConfiguration.framework/SystemConfiguration,缺少所需的架构armv7在文件中
编辑
对了,感谢@gaige,我发现了一个问题;在 SystemConfiguration.framework 之前有一个不应该存在的额外斜线。我已删除框架并重新添加,但没有帮助。如何删除这个多余的斜线?