I tried running a basic opengl program from this link. I can run it successfully. Now I need some functionalities of opencv to be added in this.
So I added opencv framework from this link.
After adding the framework I changed the files to .mm and its compiling good. The problem comes when I add "cv::Mat Variable". I get the below error. What would be the reason for this?
The below is the error I get When I add "cv::Mat Variable".
Undefined symbols for architecture i386:
"_gzclose", referenced from:
_cvReleaseFileStorage in OpenCV(persistence.o)
_cvOpenFileStorage in OpenCV(persistence.o)
"_gzeof", referenced from:
icvEof(CvFileStorage*) in OpenCV(persistence.o)
"_gzgets", referenced from:
icvGets(CvFileStorage*, char*, int)in OpenCV(persistence.o)
"_gzopen", referenced from:
_cvOpenFileStorage in OpenCV(persistence.o)
"_gzputs", referenced from:
icvPuts(CvFileStorage*, char const*)in OpenCV(persistence.o)
"_gzrewind", referenced from:
_cvOpenFileStorage in OpenCV(persistence.o)
ld: symbol(s) not found for architecture i386
collect2: ld returned 1 exit status
This Solves my problem. To add add opencv library file
AVFoundation.framework
ImageIO.framework
libz.dylib
should be added. And this link explains clearly about this. http://aptogo.co.uk/2011/09/opencv-framework-for-ios/
Related
Please how to solve this issue... link mismatch
I'm trying to use OAUTH2.0 in my apps...
When i try to install to physical phone.. i got below message.
But when i tried on simulator is everything ok.
Undefined symbols for architecture armv7s:
"_kGTMHTTPFetcherStatusDomain", referenced from:
-[GTMOAuth2Authentication beginTokenFetchWithDelegate:didFinishSelector:] in
libOAuthTouch2.a(GTMOAuth2Authentication.o)
-[GTMOAuth2SignIn authCodeObtained] in libOAuthTouch2.a(GTMOAuth2SignIn.o) "_OBJC_CLASS_$_GTMHTTPFetcher",
referenced from:
objc-class-ref in libOAuthTouch2.a(GTMOAuth2Authentication.o)
objc-class-ref in libOAuthTouch2.a(GTMOAuth2SignIn.o) "_GTMAssertSelectorNilOrImplementedWithArgs", referenced from:
-[GTMOAuth2Authentication authorizeRequest:delegate:didFinishSelector:] in
libOAuthTouch2.a(GTMOAuth2Authentication.o)
-[GTMOAuth2SignIn initWithAuthentication:authorizationURL:delegate:webRequestSelector:finishedSelector:]
in libOAuthTouch2.a(GTMOAuth2SignIn.o) ld: symbol(s) not found for
architecture armv7s clang: error: linker command failed with exit code
1 (use -v to see invocation)
Thanks
Go to project ->build setting -> architecture and add armv6,armv7.
remove armv7s. Similarly for the target->build setting->architecture.
armv define family of instruction set being used.
I have a running cocos2d project and a running ios storyboard project that both run without errors , when i try to embed cocos2d project into the main project i have the following errors (After disabling ARC and adding required frameworks ):
Undefined symbols for architecture i386:
"_gzclose", referenced from:
_ccInflateGZipFile in ZipUtils.o
"_gzopen", referenced from:
_ccInflateGZipFile in ZipUtils.o
"_gzread", referenced from:
_ccInflateGZipFile in ZipUtils.o
"_inflate", referenced from:
_inflateMemoryWithHint in ZipUtils.o
"_inflateEnd", referenced from:
_inflateMemoryWithHint in ZipUtils.o
"inflateInit2", referenced from:
_inflateMemoryWithHint in ZipUtils.o
"_uncompress", referenced from:
_ccInflateCCZFile in ZipUtils.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Add the libz.dylib library to the Link Binaries build phase or add -lz as other linker flag in Build Settings. Both will ensure the app is linked with the zip library needed by cocos2d.
I have included restkit in project and when i build restkit, it builds successful. But when I build project, it gives 6 errors:
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_TTModel", referenced from:
_OBJC_CLASS_$_RKObjectLoaderTTModel in libRestKitThree20.a(RKObjectLoaderTTModel.o)
"_OBJC_CLASS_$_TTTableLinkedItem", referenced from:
_OBJC_CLASS_$_RKMappableObjectTableItem in libRestKitThree20.a(RKMappableObjectTableItem.o)
"_OBJC_CLASS_$_TTTableViewDataSource", referenced from:
_OBJC_CLASS_$_RKObjectTTTableViewDataSource in libRestKitThree20.a(RKObjectTTTableViewDataSource.o)
"_OBJC_METACLASS_$_TTModel", referenced from:
_OBJC_METACLASS_$_RKObjectLoaderTTModel in libRestKitThree20.a(RKObjectLoaderTTModel.o)
"_OBJC_METACLASS_$_TTTableLinkedItem", referenced from:
_OBJC_METACLASS_$_RKMappableObjectTableItem in libRestKitThree20.a(RKMappableObjectTableItem.o)
"_OBJC_METACLASS_$_TTTableViewDataSource", referenced from:
_OBJC_METACLASS_$_RKObjectTTTableViewDataSource in libRestKitThree20.a(RKObjectTTTableViewDataSource.o)
ld: symbol(s) not found for architecture i386
collect2: ld returned 1 exit status
kindly help how to rid it off
Make sure your project is using the Three20 library. Also make sure your build order makes sense - you may need to reference three20 in your workspace/project before RestKit is compiled or in the RestKit project if you have one.
I am trying to compile the sample iphone openssl created by x2on here:
https://github.com/x2on/OpenSSL-for-iPhone
I get the following errors when trying to compile in Xcode 4.3.3:
Undefined symbols for architecture i386:
"_MD5", referenced from:
-[ViewController calculateMD5:] in ViewController.o
"_SHA256_Init", referenced from:
-[ViewController calculateSHA256:] in ViewController.o
"_SHA256_Update", referenced from:
-[ViewController calculateSHA256:] in ViewController.o
"_SHA256_Final", referenced from:
-[ViewController calculateSHA256:] 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)
I've been trying to troubleshoot this for a day or so and I am stumped on what to do.
I can provide more information if needed.
According to this site, it indicates that you need to link with libcrypto.
I just figured out why it wasn't working. I never included the shared libraries in the same folder as my project and never linked the header search paths. After cleaning up my project and rebuilding it recognized the Openssl library and it compiled.
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