Linker cannot find _objc_msgSend and many other characters

So, I have two problems with Xcode. I am new to iPhone app development, so any help would be helpful. I am creating an application with mapView, so at first I did everything as it should. Declaration, presentation uploaded, delegated, etc. After that, I associated this property with the map view, and there were 28 errors. It works on the simulator, including the card, but on the phone it always breaks. And after that I deleted all the code, which remained the same for the map view.

Some ideas what it might be? How to make a map view for iPhone?

"_OBJC_CLASS_$_NSBundle", referenced from: objc-class-ref in AppDelegate.o "_OBJC_CLASS_$_NSFileManager", referenced from: objc-class-ref in AppDelegate.o "_objc_msgSendSuper2", referenced from: -[AppDelegate dealloc] in AppDelegate.o -[MainViewController didReceiveMemoryWarning] in MainViewController.o -[MainViewController viewDidLoad] in MainViewController.o -[MainViewController viewDidUnload] in MainViewController.o -[MainViewController viewWillAppear:] in MainViewController.o -[MainViewController viewDidAppear:] in MainViewController.o -[MainViewController viewWillDisappear:] in MainViewController.o ... "_objc_setProperty", referenced from: -[AppDelegate setWindow:] in AppDelegate.o -[MainViewController setManagedObjectContext:] in MainViewController.o -[MainViewController setOdaberiTaxi:] in MainViewController.o -[MainViewController setIzbornik:] in MainViewController.o -[MainViewController setTaxiPicker:] in MainViewController.o -[MainViewController setListaTaxiZG:] in MainViewController.o -[MainViewController setToolbar:] in MainViewController.o ... "__objc_empty_vtable", referenced from: _OBJC_CLASS_$_AppDelegate in AppDelegate.o _OBJC_METACLASS_$_AppDelegate in AppDelegate.o _OBJC_CLASS_$_MainViewController in MainViewController.o _OBJC_METACLASS_$_MainViewController in MainViewController.o _OBJC_CLASS_$_FlipsideViewController in FlipsideViewController.o _OBJC_METACLASS_$_FlipsideViewController in FlipsideViewController.o "_OBJC_CLASS_$_UIResponder", referenced from: _OBJC_CLASS_$_AppDelegate in AppDelegate.o "_objc_msgSend", referenced from: _main in main.o -[AppDelegate dealloc] in AppDelegate.o -[AppDelegate application:didFinishLaunchingWithOptions:] in AppDelegate.o -[AppDelegate applicationWillTerminate:] in AppDelegate.o -[AppDelegate saveContext] in AppDelegate.o -[AppDelegate managedObjectContext] in AppDelegate.o -[AppDelegate managedObjectModel] in AppDelegate.o ... "_OBJC_CLASS_$_UIActionSheet", referenced from: objc-class-ref in MainViewController.o "_OBJC_CLASS_$_UIViewController", referenced from: _OBJC_CLASS_$_MainViewController in MainViewController.o _OBJC_CLASS_$_FlipsideViewController in FlipsideViewController.o "_objc_autoreleasePoolPop", referenced from: _main in main.o "__objc_empty_cache", referenced from: _OBJC_CLASS_$_AppDelegate in AppDelegate.o _OBJC_METACLASS_$_AppDelegate in AppDelegate.o _OBJC_CLASS_$_MainViewController in MainViewController.o _OBJC_METACLASS_$_MainViewController in MainViewController.o _OBJC_CLASS_$_FlipsideViewController in FlipsideViewController.o _OBJC_METACLASS_$_FlipsideViewController in FlipsideViewController.o "_UIApplicationMain", referenced from: _main in main.o "_OBJC_METACLASS_$_UIResponder", referenced from: _OBJC_METACLASS_$_AppDelegate in AppDelegate.o "_OBJC_CLASS_$_UIView", referenced from: objc-class-ref in MainViewController.o "_OBJC_CLASS_$_UIApplication", referenced from: objc-class-ref in MainViewController.o "_OBJC_CLASS_$_NSArray", referenced from: objc-class-ref in MainViewController.o "_OBJC_CLASS_$_NSManagedObjectContext", referenced from: objc-class-ref in AppDelegate.o "___CFConstantStringClassReference", referenced from: CFString in AppDelegate.o CFString in AppDelegate.o CFString in AppDelegate.o CFString in AppDelegate.o CFString in MainViewController.o CFString in MainViewController.o CFString in MainViewController.o ... "_OBJC_CLASS_$_UIAlertView", referenced from: objc-class-ref in MainViewController.o "_OBJC_METACLASS_$_UIViewController", referenced from: _OBJC_METACLASS_$_MainViewController in MainViewController.o _OBJC_METACLASS_$_FlipsideViewController in FlipsideViewController.o "_NSSQLiteStoreType", referenced from: -[AppDelegate persistentStoreCoordinator] in AppDelegate.o "_objc_autoreleasePoolPush", referenced from: _main in main.o "_NSStringFromClass", referenced from: _main in main.o "_NSLog", referenced from: -[AppDelegate saveContext] in AppDelegate.o -[AppDelegate persistentStoreCoordinator] in AppDelegate.o "_OBJC_CLASS_$_NSManagedObjectModel", referenced from: objc-class-ref in AppDelegate.o "_OBJC_CLASS_$_NSURL", referenced from: objc-class-ref in MainViewController.o "_OBJC_METACLASS_$_NSObject", referenced from: _OBJC_METACLASS_$_AppDelegate in AppDelegate.o _OBJC_METACLASS_$_MainViewController in MainViewController.o _OBJC_METACLASS_$_FlipsideViewController in FlipsideViewController.o "_OBJC_CLASS_$_NSPersistentStoreCoordinator", referenced from: objc-class-ref in AppDelegate.o ld: symbol(s) not found for architecture armv7 clang: error: linker command failed with exit code 1 (use -v to see invocation) 
+6
source share
2 answers

You are missing characters like __objc_msgSend , which are the main parts of the Objective-C runtime. These characters are in libobjc.dylib , which Xcode should automatically link for any Objective-C project. In addition, you are missing characters from the Foundation framework (e.g. _OBJC_CLASS_$_NSBundle ) and UIKit (e.g. _OBJC_CLASS_$_UIView ). These frames are automatically included when you create a new Objective-C project in Xcode.

The fact that you are getting these errors indicates that your project is seriously damaged. Although perhaps an expert can fix your problem, you probably don't have an expert.

So, the simplest solution for you is to simply create a new project in Xcode and copy the source files to the new project. And in a new project, be careful not to change or delete the build settings if you do not understand what they are for. It is easy to accidentally change the build setting without even realizing it, and start receiving incomprehensible error messages.

If this does not fix your problem, it is possible that your Xcode installation is corrupted, and you may have to reinstall Xcode.

0
source

I had a similar error, and this solved my problem: Click "GOALS"> "Form phases"> "Link binary files to libraries"> Click "+"> "CoreData.framework". > Add.

+39
source

Source: https://habr.com/ru/post/902881/


All Articles