3

I am receiving the following error after I moved my Xcode project from Mac that running on Xcode 4.2 into another mac running Xcode 4.5.

 "_SCError", referenced from:
      -[RKReachabilityObserver scheduleObserver] in libRestKit.a(RKReachabilityObserver.o)
      -[RKReachabilityObserver unscheduleObserver] in libRestKit.a(RKReachabilityObserver.o)
  "_SCErrorString", referenced from:
      -[RKReachabilityObserver scheduleObserver] in libRestKit.a(RKReachabilityObserver.o)
      -[RKReachabilityObserver unscheduleObserver] in libRestKit.a(RKReachabilityObserver.o)
  "_SCNetworkReachabilityCreateWithAddress", referenced from:
      +[Reachability reachabilityWithAddress:] in Reachability.o
      +[Reachability reachabilityWithAddress:] in test1ViewController.o
      -[RKReachabilityObserver initWithAddress:] in libRestKit.a(RKReachabilityObserver.o)
  "_SCNetworkReachabilityCreateWithName", referenced from:
      +[Reachability reachabilityWithHostName:] in Reachability.o
      +[Reachability reachabilityWithHostName:] in test1ViewController.o
      -[RKReachabilityObserver initWithHost:] in libRestKit.a(RKReachabilityObserver.o)
  "_SCNetworkReachabilityGetFlags", referenced from:
      -[Reachability connectionRequired] in Reachability.o
      -[Reachability currentReachabilityStatus] in Reachability.o
      -[Reachability connectionRequired] in test1ViewController.o
      -[Reachability currentReachabilityStatus] in test1ViewController.o
      -[RKReachabilityObserver getFlags] in libRestKit.a(RKReachabilityObserver.o)
  "_SCNetworkReachabilityScheduleWithRunLoop", referenced from:
      -[Reachability startNotifier] in Reachability.o
      -[Reachability startNotifier] in test1ViewController.o
  "_SCNetworkReachabilitySetCallback", referenced from:
      -[Reachability startNotifier] in Reachability.o
      -[Reachability startNotifier] in test1ViewController.o
      -[RKReachabilityObserver scheduleObserver] in libRestKit.a(RKReachabilityObserver.o)
  "_SCNetworkReachabilitySetDispatchQueue", referenced from:
      -[RKReachabilityObserver scheduleObserver] in libRestKit.a(RKReachabilityObserver.o)
      -[RKReachabilityObserver unscheduleObserver] in libRestKit.a(RKReachabilityObserver.o)
  "_SCNetworkReachabilityUnscheduleFromRunLoop", referenced from:
      -[Reachability stopNotifier] in Reachability.o
      -[Reachability stopNotifier] in test1ViewController.o
ld: symbol(s) not found for architecture i386
Martin R
  • 529,903
  • 94
  • 1,240
  • 1,382
fadd
  • 584
  • 4
  • 16
  • 41
  • @Spynet: I have taken the liberty to undo your edit of this question. This is not code but verbatim output of the linker and was already quite well formatted. – Martin R Oct 02 '12 at 13:24

7 Answers7

11

SCError, SCErrorString, ... are all from the SystemConfiguration.framework, so that seems to be missing in the "Link Binary With Libraries" settings of your target.

("Undefined symbols ..." linker errors can in many cases be resolved by looking up the symbol without the leading underscore in the XCode documentation browser. At the top of the documentation page you find the framework where the symbol is defined.)

Martin R
  • 529,903
  • 94
  • 1,240
  • 1,382
3

I had a similar issue. After adding SystemComfiguration.framework, the issue was solved.

Kishor Kundan
  • 3,135
  • 1
  • 23
  • 30
1

You forgot to add the SystemConfiguration.framework to your project.

Ayaz
  • 1,398
  • 15
  • 29
1

Try creating a new scheme. I was seeing similar error messagess in Xcode 6.3 – this solved it for me.

kim adams
  • 11
  • 2
0

It looks like you might have forgotten to include the RestKit. Add the library, and see if you still get the issues.

FeifanZ
  • 16,250
  • 7
  • 45
  • 84
0

The problem is most likely that the project is not including the RestKit. Go to your Target -> Build Phases -> Link and verify that in fact you have RestKit there.

Paresh Masani
  • 7,474
  • 12
  • 73
  • 139
0
  1. Add SystemComfiguration.framework to your target.
  2. also add #import <SystemConfiguration/SystemConfiguration.h>
Ram G.
  • 3,045
  • 2
  • 25
  • 31