这是我的代码。运行此程序时,出现以下错误。,,
体系结构 i386 的未定义符号:
“_OBJC_CLASS_$_Reachability”,引用自:
ASKViewController.o 中的 objc-class-ref
ld:未找到体系结构 i386 的符号
clang:错误:链接器命令失败,退出代码为 1(使用 -v查看调用)
-(void) checknetork{
Reachability *reach=[Reachability reachabilityWithHostName:@"http://www.google.com.sg"];
NetworkStatus netstatus=[reach currentReachabilityStatus];
bool net;
switch (netstatus)
{
case NotReachable:
net=NO;
break;
case ReachableViaWiFi:
net=YES;
break;
case ReachableViaWWAN:
net=YES;
break;
}
if (net)
{
HUD.labelText=@"Connecting.,,";
HUD.customView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@""]];
HUD.mode = MBProgressHUDModeCustomView;
[HUD hide:YES afterDelay:2];
return;
}
else
{
UIAlertView *alert=[[UIAlertView alloc] initWithTitle:@"Alert.!" message:@"Check Your Network Connection.!" delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil];
[alert show];
}
}