本文介绍了Apple的Reachability文件中存在奇怪的错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试在项目中使用可达性。我添加了Reachability.h和Reachability.m文件。但是在构建项目之后,xCode显示了奇怪的错误:
I'm trying to work with reachability in my project. I added Reachability.h and Reachability.m files. But after building project xCode shows me strange errors:
Undefined symbols for architecture i386:
"_SCNetworkReachabilityCreateWithName", referenced from:
+[Reachability reachabilityWithHostname:] in Reachability.o
"_SCNetworkReachabilityCreateWithAddress", referenced from:
+[Reachability reachabilityWithAddress:] in Reachability.o
"_SCNetworkReachabilitySetCallback", referenced from:
-[Reachability startNotifier] in Reachability.o
-[Reachability stopNotifier] in Reachability.o
"_SCError", referenced from:
-[Reachability startNotifier] in Reachability.o
"_SCErrorString", referenced from:
-[Reachability startNotifier] in Reachability.o
"_SCNetworkReachabilitySetDispatchQueue", referenced from:
-[Reachability startNotifier] in Reachability.o
-[Reachability stopNotifier] in Reachability.o
"_SCNetworkReachabilityGetFlags", referenced from:
-[Reachability isReachable] in Reachability.o
-[Reachability isReachableViaWWAN] in Reachability.o
-[Reachability isReachableViaWiFi] in Reachability.o
-[Reachability connectionRequired] in Reachability.o
-[Reachability isConnectionOnDemand] in Reachability.o
-[Reachability isInterventionRequired] in Reachability.o
-[Reachability reachabilityFlags] in Reachability.o
如何解决这个问题?
推荐答案
可能你忘了添加SystemConfiguration.framework到您的项目。如果您不知道如何添加框架,请查看此。
Probably you forgot to add the SystemConfiguration.framework to your project. If you don't know how to add a framework have a look at this SO question.
这篇关于Apple的Reachability文件中存在奇怪的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!