Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Apple Mach-O Linker errors and I don't know what to do

I cannot compile my project for the device or simulator anymore. I get 13 Apple Mach-O-Linker errors. It all started after I failed attempt to use sharekit. Here is the log from the error:

ld: warning: directory not found for option '-F/Users/bbrandy95/Documents/Broken Brandsonic Web Projects/Brandsonic Web mobile/../../Downloads/0.2.1gm1/iphoneos4.0/System/Library/Frameworks'
Undefined symbols for architecture armv7:
  "_OBJC_CLASS_$_NSURLRequest", referenced from:
      objc-class-ref in Brandsonic_Web_mobileAppDelegate.o
      objc-class-ref in Brandsonic_Web_mobileViewController.o
  "_OBJC_CLASS_$_NSAutoreleasePool", referenced from:
      objc-class-ref in main.o
  "_objc_msgSendSuper2", referenced from:
      -[Brandsonic_Web_mobileAppDelegate dealloc] in Brandsonic_Web_mobileAppDelegate.o
      -[Brandsonic_Web_mobileViewController didReceiveMemoryWarning] in Brandsonic_Web_mobileViewController.o
      -[Brandsonic_Web_mobileViewController dealloc] in Brandsonic_Web_mobileViewController.o
  "_objc_setProperty", referenced from:
      -[Brandsonic_Web_mobileAppDelegate setWindow:] in Brandsonic_Web_mobileAppDelegate.o
      -[Brandsonic_Web_mobileAppDelegate setViewController:] in Brandsonic_Web_mobileAppDelegate.o
  "__objc_empty_vtable", referenced from:
      _OBJC_CLASS_$_Brandsonic_Web_mobileAppDelegate in Brandsonic_Web_mobileAppDelegate.o
      _OBJC_METACLASS_$_Brandsonic_Web_mobileAppDelegate in Brandsonic_Web_mobileAppDelegate.o
      _OBJC_CLASS_$_Brandsonic_Web_mobileViewController in Brandsonic_Web_mobileViewController.o
      _OBJC_METACLASS_$_Brandsonic_Web_mobileViewController in Brandsonic_Web_mobileViewController.o
      _OBJC_METACLASS_$_SecondView in SecondView.o
      _OBJC_CLASS_$_SecondView in SecondView.o
  "_objc_msgSend", referenced from:
      _main in main.o
      -[Brandsonic_Web_mobileAppDelegate application:didFinishLaunchingWithOptions:] in Brandsonic_Web_mobileAppDelegate.o
      -[Brandsonic_Web_mobileAppDelegate dealloc] in Brandsonic_Web_mobileAppDelegate.o
      -[Brandsonic_Web_mobileAppDelegate GOOGLE] in Brandsonic_Web_mobileAppDelegate.o
      -[Brandsonic_Web_mobileAppDelegate YOUTUBE] in Brandsonic_Web_mobileAppDelegate.o
      -[Brandsonic_Web_mobileAppDelegate WIKI] in Brandsonic_Web_mobileAppDelegate.o
      -[Brandsonic_Web_mobileViewController webView:shouldStartLoadWithRequest:navigationType:] in Brandsonic_Web_mobileViewController.o
      ...
  "__objc_empty_cache", referenced from:
      _OBJC_CLASS_$_Brandsonic_Web_mobileAppDelegate in Brandsonic_Web_mobileAppDelegate.o
      _OBJC_METACLASS_$_Brandsonic_Web_mobileAppDelegate in Brandsonic_Web_mobileAppDelegate.o
      _OBJC_CLASS_$_Brandsonic_Web_mobileViewController in Brandsonic_Web_mobileViewController.o
      _OBJC_METACLASS_$_Brandsonic_Web_mobileViewController in Brandsonic_Web_mobileViewController.o
      _OBJC_METACLASS_$_SecondView in SecondView.o
      _OBJC_CLASS_$_SecondView in SecondView.o
  "_OBJC_CLASS_$_NSObject", referenced from:
      _OBJC_CLASS_$_Brandsonic_Web_mobileAppDelegate in Brandsonic_Web_mobileAppDelegate.o
  "___CFConstantStringClassReference", referenced from:
      CFString in Brandsonic_Web_mobileAppDelegate.o
      CFString in Brandsonic_Web_mobileAppDelegate.o
      CFString in Brandsonic_Web_mobileAppDelegate.o
      CFString in Brandsonic_Web_mobileViewController.o
      CFString in Brandsonic_Web_mobileViewController.o
      CFString in Brandsonic_Web_mobileViewController.o
      CFString in Brandsonic_Web_mobileViewController.o
      ...
  "_OBJC_CLASS_$_NSKeyedUnarchiver", referenced from:
      objc-class-ref in Brandsonic_Web_mobileViewController.o
  "_OBJC_CLASS_$_NSUserDefaults", referenced from:
      objc-class-ref in Brandsonic_Web_mobileViewController.o
  "_OBJC_CLASS_$_NSURL", referenced from:
      objc-class-ref in Brandsonic_Web_mobileAppDelegate.o
      objc-class-ref in Brandsonic_Web_mobileViewController.o
  "_OBJC_METACLASS_$_NSObject", referenced from:
      _OBJC_METACLASS_$_Brandsonic_Web_mobileAppDelegate in Brandsonic_Web_mobileAppDelegate.o
      _OBJC_METACLASS_$_Brandsonic_Web_mobileViewController in Brandsonic_Web_mobileViewController.o
      _OBJC_METACLASS_$_SecondView in SecondView.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
'

How do I fix this? Please help.

like image 420
Sega dude Avatar asked Jan 02 '12 23:01

Sega dude


3 Answers

For every one with an similar error. If that happens you normally can remove the "Path" under Point

target->Build Settings->Library Search Paths enter image description here

like image 51
crashbus Avatar answered Oct 29 '22 04:10

crashbus


This error can occur when a framework is added to a project more than once.

  • You can fix this by removing the duplicate. To find it, select the framework in the Xcode project navigator and choose Show in Finder. Then clean and build your project.

This can also be caused if you're missing framework header files or a reference to them.

  • In that case, you should trying removing the SDK or framework and adding it again.

Good luck.

like image 20
Divine_Code Avatar answered Oct 29 '22 05:10

Divine_Code


If you installed dependencies using CocoaPods, make sure you open your XCode project by clicking on your .xcworkspace file, and not the .xcodeproj file.

like image 5
Chris Chute Avatar answered Oct 29 '22 05:10

Chris Chute