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.
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.
After installing the new sdk I cleaned the project and build it. It fails with this message:
Undefined symbols for architecture i386:
"_SecRandomCopyBytes", referenced from:
+[FBCrypto randomBytes:] in FacebookSDK(FBCrypto.o)
-[FBCrypto encrypt:additionalDataToSign:] in FacebookSDK(FBCrypto.o)
"_kSecRandomDefault", referenced from:
+[FBCrypto randomBytes:] in FacebookSDK(FBCrypto.o)
-[FBCrypto encrypt:additionalDataToSign:] in FacebookSDK(FBCrypto.o)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Same problem anyone? Solutions?
Well, you need to include the security framework and the libsqlite3.dylib as stated here.
It works now.
edit
Also found this now...
Jumping on this, im running into the same issue, I saw that the FBSDK needs the Security, AdSupport, etc. Here's my linked libraries:
My error is the same:
Undefined symbols for architecture i386:
"_SecRandomCopyBytes", referenced from:
+[FBCrypto randomBytes:] in FacebookSDK(FBCrypto.o)
-[FBCrypto encrypt:additionalDataToSign:] in FacebookSDK(FBCrypto.o)
"_kSecRandomDefault", referenced from:
+[FBCrypto randomBytes:] in FacebookSDK(FBCrypto.o)
-[FBCrypto encrypt:additionalDataToSign:] in FacebookSDK(FBCrypto.o)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
All the other framework dependencies are good to go as far as I can tell. A Vlean->Build didn't fix it either. Thanks.
Edit: Got it. I needed to re Add Files to Project and check the Add to Target button.. basically XCode automagicka
I am developing an app that saving an url using coredata.I am defining NSManagedObjectContext,NsManagedObjectModel,NSPersistentStoreCoordinator in CoreDataRepository object class instead of AppDelegate.I am saving this url using reference of CoreDataRepository.I am getting below error.
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_CoreDataRepository", referenced from:
objc-class-ref in HomeViewController.o
objc-class-ref in DashBoardUrlViewController.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Any idea about this error.Thanks.
The linker can't find your CoreDataRepository class. Look in your target's Build Phases and add that source or library to either the compile or link phase, depending on where it's defined.
I am implementing Push notification(urban airship) in my application. I have written the code and also added the necessary framework including libUAirship-1.1.1.a but it shows me following error.
Undefined symbols for architecture i386:
"_UTTypeCreatePreferredIdentifierForTag", referenced from:
+[UA_ASIHTTPRequest mimeTypeForFileAtPath:] in libUAirship-1.1.1.a(UA_ASIHTTPRequest.o)
"_UTTypeCopyPreferredTagWithClass", referenced from:
+[UA_ASIHTTPRequest mimeTypeForFileAtPath:] in libUAirship-1.1.1.a(UA_ASIHTTPRequest.o)
"_kUTTagClassFilenameExtension", referenced from:
+[UA_ASIHTTPRequest mimeTypeForFileAtPath:] in libUAirship-1.1.1.a(UA_ASIHTTPRequest.o)
"_kUTTagClassMIMEType", referenced from:
+[UA_ASIHTTPRequest mimeTypeForFileAtPath:] in libUAirship-1.1.1.a(UA_ASIHTTPRequest.o)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I can't understand why this error generated.
Check out this document it may help you : Push Notification Client Library
I have integrated a new external framework to my project, the framework is well imported, however, i get a strange error when trying to build and run the project:
"_OBJC_CLASS_$_MPInit", referenced from:
objc-class-ref in ViewController.o
"_OBJC_CLASS_$_RMMapView", 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)
I try several attempts but haven't find the solution.
Any suggestion will be appreciated.