+ (Class)layerClass won't work - iphone

I'm building an OpenGL application and on eaglview.m + (Class)layerClass wont work.
If i try to run it I get:
"Undefined symbols for architecture i386:
"_OBJC_CLASS_$_CAEAGLLayer", referenced from:
objc-class-ref in GLView.o
ld: symbol(s) not found for architecture i386
collect2: ld returned 1 exit status"
How can I fix this?

You need to add the OpenGL and potentially the QuartzCore frameworks to the target to link them.

Related

ignoring file /[path]/libGooglePlus.a, missing required architecture i386 in file[path]/libGooglePlus.a

in my google plus code i get this error. what problem for this error in my code
_OBJC_CLASS_$_GTMLogger", referenced from:
objc-class-ref in libGooglePlusUniversal.a(GPPShareBuilderImpl.o)
"_OBJC_CLASS_$_GTMOAuth2Keychain", referenced from:
objc-class-ref in libGooglePlusUniversal.a(GPPSignIn.o)
"_OBJC_CLASS_$_GTMOAuth2SignIn", referenced from:
objc-class-ref in libGooglePlusUniversal.a(GPPSignIn.o)
"_OBJC_CLASS_$_GTMOAuth2ViewControllerTouch", referenced from:
objc-class-ref in libGooglePlusUniversal.a(GPPSignIn.o)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
have you added frameworks like... libxml2.dylib, security,mapkit,corelocation,systemconfiguration frameworks etc....?? if not then add those frameworks and then check...
Let me know it is working or not!!!!!
Happy coding!!!!!!
This warning means that you're trying to use library made for Device (ARM) with your Simulator (i386).

Issue in adding google Analytics to iOS

After adding the libGoogleAnalytics.a CFNetwork and libsqlite3.0.dylib frameworks, and added the GANTracker.h into my AppDelegate.m
I get this error:
Undefined symbols for architecture armv7:
"_OBJC_CLASS_$_GANTracker", 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)
and the app won't even compile. My app is aimed at iOS 5.0

errors in Sending email in iPhone

I'm trying to create application that sends email
I used classes like
SKPSMTPMessage , NSStream+SKPSMTPExtensions, NSData+Base64Additions, HSK_CFUtilities, Base64Transcoder
but it gives me the following errors
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_SKPSMTPMessage", referenced from:
objc-class-ref in MFViewController.o
"_kSKPSMTPPartContentTransferEncodingKey", referenced from:
-[MFViewController sendMail:] in MFViewController.o
"_kSKPSMTPPartContentTypeKey", referenced from:
-[MFViewController sendMail:] in MFViewController.o
"_kSKPSMTPPartMessageKey", referenced from:
-[MFViewController sendMail:] in MFViewController.o
"_CFHostCreateWithName", referenced from:
+[NSStream(SKPSMTPExtensions) getStreamsToHostNamed:port:inputStream:outputStream:] in NSStream+SKPSMTPExtensions.o
+[NSStream(SKPSMTPExtensions) getStreamsToHostNamed:port:inputStream:outputStream:] in SKPSMTPMessage.o
"_CFStreamCreatePairWithSocketToCFHost", referenced from:
+[NSStream(SKPSMTPExtensions) getStreamsToHostNamed:port:inputStream:outputStream:] in NSStream+SKPSMTPExtensions.o
+[NSStream(SKPSMTPExtensions) getStreamsToHostNamed:port:inputStream:outputStream:] in SKPSMTPMessage.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
keep in mind that I'm using Xcode 4.3 ,
what shall I do to solve this??
After adding the CFNetwork framework and SystemConfiguration framework ,
the number of errors decreased from 6 to 4 and it is now
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_SKPSMTPMessage", referenced from:
objc-class-ref in MFViewController.o
"_kSKPSMTPPartContentTransferEncodingKey", referenced from:
-[MFViewController sendMail:] in MFViewController.o
"_kSKPSMTPPartContentTypeKey", referenced from:
-[MFViewController sendMail:] in MFViewController.o
"_kSKPSMTPPartMessageKey", referenced from:
-[MFViewController sendMail:] in MFViewController.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
This error message means that those classes search some objects in a framework that you haven't linked to your project. Here you can found what framework do you need: the CFNetwork framework.
I hope it helps!
EDIT
The other 4 errors might be caused by the incorrect importation of the SKPSMT classes. If that classes are downloaded as a library, you'll also need to link your app with that library.
Try adding the following linker flags:
OTHER_LDFLAGS = -lz -lxml2 -ltidy -ObjC

TTURLJSONResponse Undefined symbols for architecture i386

Good Day!
I tried to recreate the sample TTFacebook Project of the three20 samples in an XCode4 IDE, but I got this error about TTURLJSONResponse
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_TTURLJSONResponse", referenced from:
objc-class-ref in FacebookSearchFeed.o
ld: symbol(s) not found for architecture i386
collect2: ld returned 1 exit status
thanks, much love and respect
Make sure you added Three20:extThree20JSON+YAJL or Three20:extThree20JSON+SBJSON to your project (either manually or via ttmodule.py), also make sure they compile fine (look if the binaries are not red in your project Build Phases).

"_OBJC_CLASS_$_MKAnnotationView", referenced from: ERROR

.framework/MapKit, file was built for i386 which is not the architecture being linked (armv6)
Undefined symbols:
"_OBJC_CLASS_$_MKAnnotationView", referenced from:
objc-class-ref-to-MKAnnotationView in MapViewController.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
I am getting this error when building on my device even though I added the mapkit and corelocation frameworks. Does anyone know how i can solve this problem?
Add the framework MapKit to your project.