I am trying to create a photo gallery in my app, I tried to use Three20 and EGOPhotoViewer. I would like to use EgoPhotoViewer but I am new at programming and I don't know how to install EgoPhotoViewer to my app. When I try to use it I got this error:
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_MyPhoto", referenced from:
objc-class-ref in MasterViewController.o
"_OBJC_CLASS_$_MyPhotoSource", referenced from:
objc-class-ref in MasterViewController.o
"_OBJC_CLASS_$_EGOPhotoViewController", referenced from:
objc-class-ref in MasterViewController.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Is there any way of doing this?
If EGOPhotoViewer is just a couple of classes (which is what it sounds like), then drag them into your project and #import and #class them in the proper files. If it's a framework, then drag it into your project and make sure that it is being linked in build settings, then #import <> the necessary header.
Your undefined symbols error just means that you're trying to reference an invisible, non-existent, or out of reach class.
EDIT: For future reference because I know you're still a beginner. When you see "Undefined symbols for architecture XXXX"; the XXXX is the MOST important part. If it says armv6 or armv7, then you have a device build problem. If it says "i386", that's a simulator problem. I'm going to guess that the classes for EGOPhotoViewer are universal, but there are cases where the dunderheads decided not to build for the simulator (Dropbox anyone?) and undefined symbols for architecture i386 would come up.
Related
I've read close to 50 threads on here, regarding linking frameworks to an Xcode project, but I've yet to find one that covers an issue I'm having with Facebook's Audience Network framework.
I'm using Xcode 4.2.3 (I'm on an old mac with OS X Lion - don't ask!), building for iOS 6.1, using Facebook SDK 3.2.1.
I'm trying to test banner ad formats within specific view controllers, however, getting an error every time I build the code, based exactly on the tutorials, even Facebook's sample code isn't compiling. I've added FBAudienceNetwork.framework to almost every folder on my machine, added via dragging and dropping, and via the Link Binary with Libraries option. I've tried to changing the Framework Search paths, to no avail.
I'm using the following frameworks: AdSupport, StoreKit, CoreMotion, UIKit, Foundation, CoreGraphics
Getting the following error:
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_CAShapeLayer", referenced from:
objc-class-ref in FBAudienceNetwork(FBAdChoicesView.o)
"_OBJC_CLASS_$_CATransaction", referenced from:
objc-class-ref in FBAudienceNetwork(FBAdUtility.o)
objc-class-ref in FBAudienceNetwork(FBAdMediumRectangleView.o)
"_OBJC_CLASS_$_NSURLSession", referenced from:
objc-class-ref in FBAudienceNetwork(FBAdUtility.o)
"_kCATransactionDisableActions", referenced from:
-[FBAdMediumRectangleView updateViewForSize:view:] in FBAudienceNetwork(FBAdMediumRectangleView.o)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Any suggestions?
UPDATE: Added in Quartzcore.framework, and errors now reduced to;
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_NSURLSession", referenced from:
objc-class-ref in FBAudienceNetwork(FBAdUtility.o)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I've made Foundation.framework optional. Build settings armv7, armv7s, iOS 6.1, Simulator only. Build Active Architecture ONLY Yes/No.
I'm a software engineer on the Audience Network team at Facebook, and I have some suggestions that may help.
Try adding "QuartzCore.framework" to your target. That should resolve the _OBJC_CLASS_$_CA* linker errors. Classes with a "CA" prefix are part of QuartzCore/Core Animation.
If the "_OBJC_CLASS_$_NSURLSession" error still appears, try weak-linking the Foundation framework by setting the "Foundation.framework" to "optional" in Build Phases, Link Binary With Libraries.
You should be able to successfully build after those steps. Hope that helps!
NSURLSession was added in iOS 7.0. Any improper reference to it in your app will cause this problem when ran on a device with iOS 6.0. You need to use proper techniques to ensure the class is never referenced under iOS 6.0 or make your deployment target iOS 7.0.
All,
I have installed the Stripe SDK and I have added :
PassKit.framework
Security.framework
Foundation.framework
QuartzCore.framework
When I build the application (its empty) all it has got is my public key.
I get :
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_Stripe", referenced from:
__TMaCSo6Stripe 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)
Have i got enough frameworks or am I missing any ?
Any help would be brilliant
It sounds like you're not properly #importing Stripe.h. You'll need to create a bridging header for your project that contains #import <Stripe/Stripe.h>. For more, see Apple's guide to Swift/Objective-C interoperability: https://developer.apple.com/library/ios/documentation/swift/conceptual/buildingcocoaapps/MixandMatch.html
Best,
Jack
Why i am still getting this error even after linking fat library
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_NgnEngine", referenced from:
objc-class-ref in ViewController.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
and linking everything in "User-Defined
I am following the instruction which written here Link ios-ngn-stak to your app
any help please, this is tiring me and it is my senior project
please refer this two link for getting solution if your issue:-
Error : "_OBJC_CLASS_$_NgnEngine"
Xcode with iOS - Creating a library in a way that is easy to run in debug mode, distribute, iterate
Undefined symbols for architecture i386:
"_AudioServicesPlaySystemSound", referenced from:
-[GADWebViewDelegate webView:shouldStartLoadWithRequest:navigationType:] in libGoogleAdMobAds.a(GADWebViewDelegate.o)
"_OBJC_CLASS_$_MFMailComposeViewController", referenced from:
objc-class-ref in libGoogleAdMobAds.a(GADOpener.o)
"_OBJC_CLASS_$_MFMessageComposeViewController", referenced from:
objc-class-ref in libGoogleAdMobAds.a(GADOpener.o)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
What does it means? what do I need to do in order to fix that?
Thanks alot.
FYI - I had to add the AudioToolbox framework to get this to compile.
The solution was to add AVAudioPlayer and MessageUI frameworks. That's about it.
From where ever you have got the library that you are using, its only compiled to be used on the device.. (architecture armv7), where as you are trying to test it on the simulator (architecture i386) thus the error. So if you want to test it on the simulator, get a version of the library which is compiled for i386.
You can also combine both the libraries using lipo command and use it on any architecture..
hoping this helps.. :)
I am trying to build a simple torch application for iOS 5 as described in http://developer.apple.com/library/mac/releasenotes/AudioVideo/RN-AVFoundation/_index.html#//apple_ref/doc/uid/TP40010717-CH1-DontLinkElementID_17 but i am getting "Apple Match-O Linker Error:
Undefined symbols for architecture armv7:
"_AVMediaTypeVideo", referenced from:
-[FirstViewController viewDidLoad] in FirstViewController.o
"_OBJC_CLASS_$_AVCaptureDevice", referenced from:
objc-class-ref in FirstViewController.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Any help appreciated
Anybody ?
Additionally: it only happens when running the project, no errors if i just clean & Build, and the code completion detects the library.
Thanks
You might need to link your project with the AVFoundation framework first.
If you're already doing that, make sure you're building for armv7 and not just armv6.
Check it in your project settings > Target > Build Settings > Architecture
As simple as this:
Linker errors like this indicate that a symbol is missing when the app is being linked. Most system symbols like these, come from system frameworks. So, I was missing a framework in my project that contains AVCaptureDevice and AVMediaTypeVideo.
To solve it, i just added the AVFoundation framework following this tutorial: http://www.thinketg.com/Company/Blogs/11-03-20/Xcode_4_Tips_Adding_frameworks_to_your_project.aspx
Now it runs !