0

I am getting this linked error in tonymillion Reachability class. I am using this to get the internet connection in my ios app. Anyone tell me why is this error coming.

Ld /Users/Mathaly/Library/Developer/Xcode/DerivedData/ResQ-bkakeqfqsmrivngctueeyzttnpno/Build/Products/Debug-iphoneos/ResQ-mobile.app/ResQ-mobile normal arm64

cd /Users/Mathaly/Desktop/Gunjan/Business/LogicRoots/Game/Mathaly2/proj.ios_mac

export IPHONEOS_DEPLOYMENT_TARGET=6.0

export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.4.sdk -L/Users/Mathaly/Library/Developer/Xcode/DerivedData/ResQ-bkakeqfqsmrivngctueeyzttnpno/Build/Products/Debug-iphoneos -F/Users/Mathaly/Library/Developer/Xcode/DerivedData/ResQ-bkakeqfqsmrivngctueeyzttnpno/Build/Products/Debug-iphoneos -filelist /Users/Mathaly/Library/Developer/Xcode/DerivedData/ResQ-bkakeqfqsmrivngctueeyzttnpno/Build/Intermediates/ResQ.build/Debug-iphoneos/ResQ.build/Objects-normal/arm64/ResQ-mobile.LinkFileList -dead_strip -stdlib=libc++ -fobjc-link-runtime -miphoneos-version-min=6.0 -liconv -framework Security /Users/Mathaly/Library/Developer/Xcode/DerivedData/ResQ-bkakeqfqsmrivngctueeyzttnpno/Build/Products/Debug-iphoneos/libcocos2d\ iOS.a -framework CoreMotion -framework Foundation -framework UIKit -framework CoreGraphics -framework OpenGLES -lz -framework QuartzCore -framework OpenAL -framework AVFoundation -framework AudioToolbox -Xlinker -dependency_info -Xlinker /Users/Mathaly/Library/Developer/Xcode/DerivedData/ResQ-bkakeqfqsmrivngctueeyzttnpno/Build/Intermediates/ResQ.build/Debug-iphoneos/ResQ.build/Objects-normal/arm64/ResQ-mobile_dependency_info.dat -o /Users/Mathaly/Library/Developer/Xcode/DerivedData/ResQ-bkakeqfqsmrivngctueeyzttnpno/Build/Products/Debug-iphoneos/ResQ-mobile.app/ResQ-mobile

Undefined symbols for architecture arm64:

  "_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
      ...

  "_SCNetworkReachabilitySetDispatchQueue", referenced from:
      -[Reachability startNotifier] in Reachability.o
      -[Reachability stopNotifier] in Reachability.o

  "_SCNetworkReachabilitySetCallback", referenced from:
      -[Reachability startNotifier] in Reachability.o
      -[Reachability stopNotifier] in Reachability.o

  "_SCNetworkReachabilityCreateWithAddress", referenced from:
      +[Reachability reachabilityWithAddress:] in Reachability.o

  "_SCNetworkReachabilityCreateWithName", referenced from:
      +[Reachability reachabilityWithHostname:] in Reachability.o

ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
πάντα ῥεῖ
  • 1
  • 13
  • 116
  • 190
Gunjan
  • 86
  • 1
  • 10

1 Answers1

0

Adding SystemConfiguration Framework and changing Deployment Target to IOS 6.0 solved the problem for me.

1) To add SystemConfiguration Framework: Select your project and then select your target (mobile/tablet), then select Build Phases

There is block named Link Binary with Libraries, at the end of it there is + sign click on that. It will open a dialog box search for systemconfiguration in that and then click ok/add.

2) To change Deployment Target: Select your project and then select your target (mobile/tablet), then select Build settings.

There is block of deployment and then IOS Deployment Target, change it IOS 6.0 or above.

Hope this will be helpful

Gunjan
  • 86
  • 1
  • 10