title: Xcode: Apple Mach-O Linker Error: Undefined symbols for architecture i386
body: <p>This is my code. While Running this, I get the below error.,,</p>
  
  <blockquote>
    <p>Undefined symbols for architecture i386:<br>
      "_OBJC_CLASS_$_Reachability", referenced from:<br>
          objc-class-ref in ASKViewController.o<br>
    ld: symbol(s) not found for architecture i386<br>
    clang: error: linker command failed with exit code 1 (use -v to see invocation)</p>
  </blockquote>
  
  <pre><code>-(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];
      }
  }
  </code></pre>