j'ai essayé de compiler le code exemple de Ercia Sadun here, mais cette erreur est venu:SCNetworkReachability compilation erreur
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)
... Même après systemConfiguration.framework ajouté, il a signalé la même erreur. Pourquoi l'a-t-il fait et comment puis-je le faire fonctionner?
/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.1.sdk/System/Library/Frameworks/SystemConfiguration.frameame – arachide
@user Si vous compilez pour le simulateur, le chemin doit être '/ Dev/Pl/'**' iPhoneSimulator.platform' ** '/ Dev/SDKs /' ** 'iPhoneSimulator3.1.sdk' **'/Sys/Lib/Fr/SysConf.fr'. Sélectionnez le framework SysConf, affichez Info et sélectionnez "relatif au SDK actuel". – kennytm
J'essaie d'ajouter le cadre que vous avez dit, mais quand je vérifie en cliquant sur 'Getinfo' il pointe toujours à /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.1.sdk/System/Library/Frameworks /SystemConfiguration.framework J'ai vérifié le projet d'Erica Sadun, ça marche bien maintenant. mais si j'ajoute leurs codes source à mon projet, l'erreur persiste. – arachide