Undefined symbols for architecture x86_64: "_OBJC_CLASS_$_ToDoItem" - ios

I'm trying to the Xcode Tutorial on a iOS ToDoApp. I've done all the steps and certainly I've got compile errors.
I've searched around and I've seen that I'm not the only one with this problem, and I have tried peoples solutions but with no success.
This is my error message:
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_ToDoItem", referenced from:
objc-class-ref in ToDoListTableViewController.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

It seems you are missing ToDoItem.m (or better said the #implementation ToDoItem) in your project. Either it's not there at all or the file is not included in the build target.
Try to search #implementation ToDoItem in your project. If it's missing, you have to add it. If it's not missing, make sure that the file is added to the target you are trying to build.

Related

Undefined symbols for architecture x86_64 when using Tesseract

I am using tesseract provided by google. After following this tutorial, i finally built finish my app. However, when i run it, i run into the problem of undefined symbols. This is the error
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_G8Tesseract", referenced from:
objc-class-ref in ViewController.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
How do i fix this issue? I tried searching online but none of the solutions worked for me. I tried reinstalling the pods and updating it. Then i faced this error
clang: error: no such file or directory: '/Users/admin/Desktop/tst/Pods/Target Support Files/Pods-tst/Pods-tst-dummy.m'
clang: error: no input files
When i tried redoing the project i get his error
Undefined symbols for architecture arm64:
"_OBJC_CLASS_$_G8Tesseract", referenced from:
objc-class-ref in ViewController.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Apparently i had to add the TesseractOCR.framework separately even after using cocoa pods and disable Bitcode. This prevented the errors.
I think you should update pod version:
sudo gem install cocoapods
After this run:
pod update --verbose
Since Tesseract requires libstdc++.6.0.9.dylib (or libstdc++.6.0.9.tbd if libstdc++.6.0.9.dylib is unavailable in your current Xcode version) and CoreImage.framework you’ll need to link both of these libraries in.
In the General tab, scroll down to Linked Frameworks and Libraries.
There should be only one file here: TesseractOCR.framework, which you just added. Click the + button underneath the list. Find both libstdc++.dylib (or libstdc++.6.0.9.tbd) and CoreImage.framework and add them to your project.

ParseFacebookUtil: Apple Mach-O Linker, undefined symbol for architecture x86_64 PFDateFormatter

Error occurs after adding the ParseFacebookUtil
ERROR MESSAGE
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_PFDateFormatter", referenced from:
objc-class-ref in ParseFacebookUtils(PFFacebookAuthenticationProvider.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
FRAMEWORKS
I am using XCode 6.2
Thanks
edit:
I've added the frameworks social, and accounts. Same error still occurs.
I ended up fixing this issue by deleting the Parse and Bolts framework, and re adding it back into the project.
Edit:
The best solution to this issue is by using cocoapods. It handles the dependencies better than manually dragging in the framework files.

cocoapods linker error when i added it to my project

i'm using cocoapods for the first time and after everything goes well
i get to run my project that was always wor˚ and got those 2 errors in lin˚er
can anyone please tell me what is it
than˚s
Undefined symbols for architecture armv7:
"_OBJC_CLASS_$_PECropViewController", referenced from:
objc-class-ref in addProductViewController.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
The addProductViewController object is not found and it was referenced within AppDelegate. You do not link addProductViewController into your app. Check if your Compile Sources section within the Build Phases of your project shows addProductViewController.m
than˚s every body for your help
the problem was with arm 64 i just added it in my target and everything work fine
in architectures filed add standard architectures armv7,arm64

NMSSH error on build

I am trying to use NMSSH to send ssh commande on my Raspberry Pi from an Ios applications but when I run it, I get the following error:
Undefined symbols for architecture armv7:
"_OBJC_CLASS_$_NMSFTP", referenced from:
objc-class-ref in NMSSHSession.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I ever had a similar problem resolved by adding libz.dylib library to my project, maybe I just have to do somethimg similar but i don't know what.
someone know how to solve it ?
thanks
I found it by myself, I just missed to add a library to my project.

SenTestCase linker error iOS

I'm trying to write test cases for my iOS app. However, there seems to be some problem regarding SenTesting framework. I'm getting the following error:
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_SenTestCase", referenced from:
_OBJC_CLASS_$_testSmartDiary in testSmartDiary.o
_OBJC_CLASS_$_testAddTask in testAddTask.o
_OBJC_CLASS_$_testAddContacts in testAddContacts.o
"_OBJC_METACLASS_$_SenTestCase", referenced from:
_OBJC_METACLASS_$_testSmartDiary in testSmartDiary.o
_OBJC_METACLASS_$_testAddTask in testAddTask.o
_OBJC_METACLASS_$_testAddContacts in testAddContacts.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I don't know what is going wrong. I have added the SenTestingFramework. It is probably happening because I'm using two different machines to develop the same project. Do I need to specify some path? I read the solution given here: iOS: Linker errors with OCUnit integration
but it is not feasible to delete the target and add the things again every time I switch machines. Is there a permanent solution to this? Please help

Resources