gpt4 book ai didi

iphone - 可达性类别错误

转载 作者:行者123 更新时间:2023-12-03 21:03:49 26 4
gpt4 key购买 nike

Xcode 4.2、iOS 5.0我的项目启用了 ARC,当在我的项目中添加非 ARC Reachabilty 类时,出现以下错误:

Undefined symbols for architecture i386:
"_SCNetworkReachabilitySetCallback", referenced from:
-[Reachability startNotifier] in Reachability.o
"_SCNetworkReachabilityScheduleWithRunLoop", referenced from:
-[Reachability startNotifier] in Reachability.o
"_SCNetworkReachabilityUnscheduleFromRunLoop", referenced from:
-[Reachability stopNotifier] in Reachability.o
"_SCNetworkReachabilityCreateWithName", referenced from:
+[Reachability reachabilityWithHostName:] in Reachability.o
"_SCNetworkReachabilityCreateWithAddress", referenced from:
+[Reachability reachabilityWithAddress:] in Reachability.o
"_SCNetworkReachabilityGetFlags", referenced from:
-[Reachability connectionRequired] in Reachability.o
-[Reachability currentReachabilityStatus] in Reachability.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

最佳答案

您添加的库似乎只是为设备构建的,而不是为模拟器构建的(这就是为什么它说“找不到架构 i386”)。

找到代码并将其直接添加到您的项目中,您应该能够为设备和模拟器进行构建。

关于iphone - 可达性类别错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10052102/

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