Facebook SDK Linker Error - ios

Undefined symbols for architecture armv7:
"_OBJC_CLASS_$_Facebook", 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)
I've been snooping around here looking for an answer, but have yet to find one. I've tried what other people have suggested, as in using an older SDK copy but still get this linker error. The SDK tutorial Tutorial suggests after running the script they include to drag the folder into your project. When I drag the folder I get problems. When I create a directory in my project for the files and just drag the files, then it works, but still with this linker error.
Am I missing something else? I've followed the tutorial to the " T " and still can't figure it out.
Thanks

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.

Apple Mach-O Linker Error during profile

So I ran into this wierd issue where I am able to compile and run my iOS project in simulator with out any issues but when I ran it for profiling with instrument (cmd + I) I am getting Apple mach o linker error for one of the library. I tried it reading to project but it did not helped. I also checked my search paths which looks as following
Other Linker Flags: -ObjC -all_load
Always Search User Paths: No
Framework Search Paths:$(SRCROOT) recursive
Library Search Paths:$(SRCROOT) recursive
I am getting following error message:
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_TestFlight", referenced from:
objc-class-ref in AppDelegate.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Am I missing anything in my linking phase which causing this thing to happen ?
It's not finding the TestFlight library. Easiest way to fix that is to find libTestFlight.a in the Xcode project browser and make sure your app is checked under "Target Membership" on the far right pane.

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