gpt4 book ai didi

iphone - SCNetworkReachability编译错误

转载 作者:行者123 更新时间:2023-12-03 18:12:22 25 4
gpt4 key购买 nike

我尝试编译Ercia Sadun的示例代码here ,但是出现了这个错误:

warning: in /Users/interdev/iphone source code/Web Browser/Classes/SystemConfiguration.framework/SystemConfiguration, missing required architecture i386 in file
Undefined symbols:
"_SCNetworkReachabilityScheduleWithRunLoop", referenced from:
+[UIDevice(Reachability) scheduleReachabilityWatcher:] in UIDevice-Reachability.o
"_SCNetworkReachabilityCreateWithAddress", referenced from:
+[UIDevice(Reachability) hostAvailable:] in UIDevice-Reachability.o
+[UIDevice(Reachability) pingReachabilityInternal] in UIDevice-Reachability.o
"_SCNetworkReachabilityUnscheduleFromRunLoop", referenced from:
+[UIDevice(Reachability) unscheduleReachabilityWatcher] in UIDevice-Reachability.o
"_SCNetworkReachabilitySetCallback", referenced from:
+[UIDevice(Reachability) scheduleReachabilityWatcher:] in UIDevice-Reachability.o
+[UIDevice(Reachability) scheduleReachabilityWatcher:] in UIDevice-Reachability.o
+[UIDevice(Reachability) unscheduleReachabilityWatcher] in UIDevice-Reachability.o
"_SCNetworkReachabilityGetFlags", referenced from:
+[UIDevice(Reachability) hostAvailable:] in UIDevice-Reachability.o
+[UIDevice(Reachability) pingReachabilityInternal] in UIDevice-Reachability.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
"_SCNetworkReachabilityScheduleWithRunLoop", referenced from:
+[UIDevice(Reachability) scheduleReachabilityWatcher:] in UIDevice-Reachability.o
"_SCNetworkReachabilityCreateWithAddress", referenced from:
+[UIDevice(Reachability) hostAvailable:] in UIDevice-Reachability.o
+[UIDevice(Reachability) pingReachabilityInternal] in UIDevice-Reachability.o
"_SCNetworkReachabilityUnscheduleFromRunLoop", referenced from:
+[UIDevice(Reachability) unscheduleReachabilityWatcher] in UIDevice-Reachability.o
"_SCNetworkReachabilitySetCallback", referenced from:
+[UIDevice(Reachability) scheduleReachabilityWatcher:] in UIDevice-Reachability.o
+[UIDevice(Reachability) scheduleReachabilityWatcher:] in UIDevice-Reachability.o
+[UIDevice(Reachability) unscheduleReachabilityWatcher] in UIDevice-Reachability.o
"_SCNetworkReachabilityGetFlags", referenced from:
+[UIDevice(Reachability) hostAvailable:] in UIDevice-Reachability.o
+[UIDevice(Reachability) pingReachabilityInternal] in UIDevice-Reachability.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
Build failed (5 errors)

...即使我添加了systemConfiguration.framework,它也报告了相同的错误。为什么要这样做?我怎样才能让它发挥作用?

最佳答案

您添加了哪个 SystemConfiguration.framework?第一行写得很清楚

warning: in /Users/interdev/iphone source code/Web Browser/Classes/SystemConfiguration.framework/SystemConfiguration, missing required architecture i386 in file

但是您应该在 /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk/System/Library/Frameworks 中添加 SDK。

应该通过项目右键菜单中的“添加现有框架...”来添加框架。

关于iphone - SCNetworkReachability编译错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2408388/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com