I am facing the following issue while building the application with core plot library.
It was working before 2 days. But it suddenly stopped running.
libCorePlot-CocoaTouch.a (2 slices)
Undefined symbols for architecture x86_64:
"_CPTDecimalFromFloat", referenced from:
-[GraphView generateLayout] in GraphView.o
"_CPTDecimalFromInt", referenced from:
-[GraphView generateLayout] in GraphView.o
"_OBJC_CLASS_$_CPTAxisLabel", referenced from:
objc-class-ref in GraphView.o
"_OBJC_CLASS_$_CPTBarPlot", referenced from:
objc-class-ref in GraphView.o
"_OBJC_CLASS_$_CPTColor", referenced from:
objc-class-ref in GraphView.o
"_OBJC_CLASS_$_CPTConstraints", referenced from:
objc-class-ref in GraphView.o
"_OBJC_CLASS_$_CPTFill", referenced from:
objc-class-ref in GraphView.o
"_OBJC_CLASS_$_CPTGraphHostingView", referenced from:
_OBJC_CLASS_$_GraphView in GraphView.o
"_OBJC_CLASS_$_CPTMutableLineStyle", referenced from:
objc-class-ref in GraphView.o
"_OBJC_CLASS_$_CPTMutableTextStyle", referenced from:
objc-class-ref in GraphView.o
"_OBJC_CLASS_$_CPTPlotRange", referenced from:
objc-class-ref in GraphView.o
"_OBJC_CLASS_$_CPTXYGraph", referenced from:
objc-class-ref in GraphView.o
"_OBJC_METACLASS_$_CPTGraphHostingView", referenced from:
_OBJC_METACLASS_$_GraphView in GraphView.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Add new core plot library framework to your project. Remove the old library. These are the steps to follow
Download the core plot library.
open the xcode CorePlot-CocoaTouch.xcodeproj
Go to project and click on build
Now go to core plot framework folder in your mac. You can see build folder in that.
Now open the terminal and give your core plot path
cd CorePlot_1.4/Source/build/
Type lipo -create ./Debug-iphoneos/libCorePlot-CocoaTouch.a ./Debug-iphonesimulator/libCorePlot-CocoaTouch.a -output core_plot_all.a
New library created and now add this library and core headers to your project.
Now build your project.
After that add -ObjC to other linker flags
Related
We have an iOS application that is referencing the AWS Mobile frameworks directly and several other libraries using CocoaPods. The project builds fine
But, when we add the 'Quickblox-SDK' as an additional library to reference in the PodFile and run pod install I get several build/linker errors:
Undefined symbols for architecture x86_64:
"_AWSSNSErrorDomain", referenced from:
___88-[AWSPushManager interceptApplication:didRegisterForRemoteNotificationsWithDeviceToken:]_block_invoke.239 in AWSMobileHubHelper(AWSPushManager.o)
"_OBJC_CLASS_$_AWSSNS", referenced from:
objc-class-ref in AWSMobileHubHelper(AWSPushManager.o)
"_OBJC_CLASS_$_AWSSNSCreatePlatformEndpointInput", referenced from:
objc-class-ref in AWSMobileHubHelper(AWSPushManager.o)
"_OBJC_CLASS_$_AWSSNSGetEndpointAttributesInput", referenced from:
objc-class-ref in AWSMobileHubHelper(AWSPushManager.o)
"_OBJC_CLASS_$_AWSSNSSetEndpointAttributesInput", referenced from:
objc-class-ref in AWSMobileHubHelper(AWSPushManager.o)
"_OBJC_CLASS_$_AWSSNSSubscribeInput", referenced from:
objc-class-ref in AWSMobileHubHelper(AWSPushManager.o)
"_OBJC_CLASS_$_AWSSNSUnsubscribeInput", referenced from:
objc-class-ref in AWSMobileHubHelper(AWSPushManager.o)
"_OBJC_CLASS_$_FBSDKAccessToken", referenced from:
objc-class-ref in AWSMobileHubHelper(AWSFacebookSignInProvider.o)
"_OBJC_CLASS_$_FBSDKApplicationDelegate", referenced from:
objc-class-ref in AWSMobileHubHelper(AWSFacebookSignInProvider.o)
"_OBJC_CLASS_$_FBSDKGraphRequest", referenced from:
objc-class-ref in AWSMobileHubHelper(AWSFacebookSignInProvider.o)
"_OBJC_CLASS_$_FBSDKLoginManager", referenced from:
objc-class-ref in AWSMobileHubHelper(AWSFacebookSignInProvider.o)
"_OBJC_CLASS_$_GIDSignIn", referenced from:
objc-class-ref in AWSMobileHubHelper(AWSGoogleSignInProvider.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
If we remove the $(inherited) flag from the Other Linker Flags build setting, getting below errors:-
bash: /User/..../AWSCore.framework/strip-frameworks.sh: No such file or directory
uploadDSYM[13005:219405] Fabric.framework/run 1.4.1 (160)
uploadDSYM[13005:219405] Launched uploader in validation mode
bash: /Users/..../Frameworks/Quickblox.framework/strip-framework.sh: No such file or directory
Any Help will be appreciated..
Thanks,
in your Pods-{PROJECT_NAME}.debug.xcconfig and Pods-{PROJECT_NAME}.release.xcconfig file, find this line
OTHER_LDFLAGS = $(inherited) -ObjC -l"z" ....
and remove the -ObjC
Alternatively, you can also fix this from XCode by going to Build Settings -> Other Linker Flags, and remove -ObjC from there
I'm trying to install Fabric and have followed the instructions (add Run Script Build Phase, Build, Drag files into project (copy off)) and all looks good.
However as soon as I try to run the app, I get a flood of errors:
ld: warning: directory not found for option '-F/Users/michael/Developer/Digicub/Mini2/MGBF2/APIs/ParseChat/Framework'
Undefined symbols for architecture armv7:
"_OBJC_CLASS_$_NSManagedObjectContext", referenced from:
objc-class-ref in TwitterKit(TFSScribe.o)
"_OBJC_CLASS_$_NSPersistentStoreCoordinator", referenced from:
objc-class-ref in TwitterKit(TFSScribe.o)
"_OBJC_CLASS_$_NSManagedObject", referenced from:
_OBJC_CLASS_$_TFSScribeEvent in TwitterKit(TFSScribeEvent.o)
_OBJC_CLASS_$_TFSScribeImpression in TwitterKit(TFSScribeImpression.o)
"_OBJC_CLASS_$_NSManagedObjectModel", referenced from:
objc-class-ref in TwitterKit(TFSScribe.o)
"_OBJC_CLASS_$_NSFetchRequest", referenced from:
objc-class-ref in TwitterKit(TFSScribe.o)
"_NSSQLitePragmasOption", referenced from:
-[TFSScribe _setupManagedObjectContext] in TwitterKit(TFSScribe.o)
"_NSInMemoryStoreType", referenced from:
-[TFSScribe _setupManagedObjectContext] in TwitterKit(TFSScribe.o)
"_OBJC_CLASS_$_NSEntityDescription", referenced from:
objc-class-ref in TwitterKit(TFSScribe.o)
"_OBJC_METACLASS_$_NSManagedObject", referenced from:
_OBJC_METACLASS_$_TFSScribeEvent in TwitterKit(TFSScribeEvent.o)
_OBJC_METACLASS_$_TFSScribeImpression in TwitterKit(TFSScribeImpression.o)
"_NSSQLiteStoreType", referenced from:
-[TFSScribe _setupManagedObjectContext] in TwitterKit(TFSScribe.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 retried a few times, uninstalling, reinstalling. Thought it might be clashing with Twitter.framework, but removing this doesn't have any effect. Any ideas how to resolve?
According to the comments by #rmaddy
Add CoreData framework worked.
Your bundle should look like this:
I m using pods to link libraries like AfNetworking, facebook etc. and its working great in release mode but I want to check Variables value by debugging but it shows all the variables nil in release mode. I tried to run in debug mode by editing schema but it failed to compile showing various libraries not found error.
Edit I have tried updating the architectures.....but this isn't helping out.
Error log in debug mode
ld: warning: directory not found for option '-L/Users/madept/Desktop/personally/Pods/build/Debug-iphoneos'
ld: warning: ignoring file /Users/madept/Desktop/personally/libCloudinary.a, missing required architecture x86_64 in file /Users/madept/Desktop/personally/libCloudinary.a (3 slices)
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_AFHTTPRequestOperation", referenced from:
objc-class-ref in ZRAPIClient.o
"_OBJC_CLASS_$_AFHTTPRequestSerializer", referenced from:
objc-class-ref in ZRAPIClient.o
"_OBJC_CLASS_$_AFJSONResponseSerializer", referenced from:
objc-class-ref in ZRAPIClient.o
"_OBJC_CLASS_$_BITHockeyManager", referenced from:
objc-class-ref in ZRAppDelegate.o
"_OBJC_CLASS_$_CLCloudinary", referenced from:
objc-class-ref in ZRMediaManager.o
"_OBJC_CLASS_$_CLTransformation", referenced from:
objc-class-ref in ZRMediaManager.o
"_OBJC_CLASS_$_DDFileLogger", referenced from:
objc-class-ref in Zooplr.o
"_OBJC_CLASS_$_DDLog", referenced from:
objc-class-ref in Chat.o
objc-class-ref in ZRManagedObject.o
objc-class-ref in ZRTelescopingScrollView.o
objc-class-ref in ZRAddMessageBarController.o
objc-class-ref in ZRCreateAccountViewController.o
objc-class-ref in ZRAddressBookHelper.o
objc-class-ref in Zooplr.o
...
"_OBJC_CLASS_$_DDTTYLogger", referenced from:
objc-class-ref in Zooplr.o
"_OBJC_CLASS_$_ELCAlbumPickerController", referenced from:
objc-class-ref in ZRMediaCaptureController.o
"_OBJC_CLASS_$_ELCImagePickerController", referenced from:
objc-class-ref in ZRMediaCaptureController.o
"_OBJC_CLASS_$_EZAudioPlotGL", referenced from:
objc-class-ref in ZRMediaCaptureController.o
"_OBJC_CLASS_$_EZMicrophone", referenced from:
objc-class-ref in ZRMediaCaptureController.o
"_OBJC_CLASS_$_EZRecorder", referenced from:
objc-class-ref in ZRMediaCaptureController.o
"_OBJC_CLASS_$_FBAppCall", referenced from:
objc-class-ref in ZRAppDelegate.o
"_OBJC_CLASS_$_FBErrorUtility", referenced from:
objc-class-ref in ZRSocialClient.o
"_OBJC_CLASS_$_FBRequest", referenced from:
objc-class-ref in ZRSocialClient.o
"_OBJC_CLASS_$_FBRequestConnection", referenced from:
objc-class-ref in ZRSocialClient.o
"_OBJC_CLASS_$_FBSession", referenced from:
objc-class-ref in ZRAppDelegate.o
objc-class-ref in ZRSocialClient.o
"_OBJC_CLASS_$_Mixpanel", referenced from:
objc-class-ref in ZRAnalyticsTracker.o
objc-class-ref in Zooplr.o
"_OBJC_CLASS_$_Reachability", referenced from:
objc-class-ref in Zooplr.o
"_OBJC_CLASS_$_SSKeychain", referenced from:
objc-class-ref in ZRAuthManager.o
"_OBJC_CLASS_$_SVProgressHUD", referenced from:
objc-class-ref in ZRAccountEditViewController.o
objc-class-ref in ZRAppDelegate.o
"_OBJC_CLASS_$_SocketIO", referenced from:
objc-class-ref in ZRChatSocketClient.o
"_OBJC_CLASS_$_TTTAttributedLabel", referenced from:
objc-class-ref in ZRBubbleViewTextMessage.o
"_kReachabilityChangedNotification", referenced from:
-[ZRAppDelegate application:didFinishLaunchingWithOptions:] in ZRAppDelegate.o
-[ZRChatSocketClient init] in ZRChatSocketClient.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Any help or suggestion would be appreciated.
if the above answer didn't work for you, maybe the problem comes from when you installed the pods. Check if you had such message when running pod install
The ProjectName [Release] target overrides the OTHER_LDFLAGS build setting defined in `Pods/Target Support Files/ProjectName/Pods-ProjectName.release.xcconfig'. This can lead to problems with the CocoaPods installation
or a similar message but with debug instead of release (or both).
If so, delete the pod project in your workspace in Xcode, then follow the answer to this question The target ... overrides the `OTHER_LDFLAGS` build setting defined in `Pods/Pods.xcconfig, I past it here :
This definitely works most of the time:
Go to your target Build Settings -> Other linker flags -> double click . Add $(inherited) to a new line.
And then run pod install again. It did it for me.
This means static libraries that you're using do not support x86_64 architecture,
So
Open "Build Settings" for "Pods" target, and add "x86_64" architecture (in "Architectures" and "Valid Architectures" section).
Set "Build Active Architectures Only" to "NO".
Clean "Pods" target.
Build your target.
Delete the .a files in /Users/YourName/Library/Developer/Xcode/DerivedData/YourProject/Build/Products/Debug-iphoneos. Then clean and build.This help me.
What worked for me is adding $(inherited) to:
OTHER_LDFLAGS
OTHER_CFLAGS
FRAMEWORK_SEARCH_PATHS
GCC_PREPROCESSOR_DEFINITIONS
Tip: Inside Build Settings -> (search bar) -> type options above and add $(inherited)
I had deleted the .a file, it won't worked for me, but when I Deleted the Project Folder in /Users/YourName/Library/Developer/Xcode/DerivedData/YourProject.
This help me.
I'm creating a project with Core-Plot lib.
I add the lib with static way.
How can I run my app in 32 + 64 bit devices?
if I run lipo libCorePlot-CocoaTouch.a -info
console response:
Architectures in the fat file: libCorePlot-CocoaTouch.a are: armv7 armv7s arm64
But this library works only with 32bit devices/simulator with 64bit simulator give me this error:
ld: warning: ignoring file PATH/libCorePlot-CocoaTouch.a, missing required architecture i386 in file PATH/libCorePlot-CocoaTouch.a (3 slices)
Undefined symbols for architecture i386:
"_CPTDecimalFromCGFloat", referenced from:
-[HomeViewController configureSecondPlots] in HomeViewController.o
-[HomeViewController configureSecondAxes] in HomeViewController.o
"_CPTDecimalFromInteger", referenced from:
-[HomeViewController configureSecondAxes] in HomeViewController.o
"_OBJC_CLASS_$_CPTAxisLabel", referenced from:
objc-class-ref in HomeViewController.o
"_OBJC_CLASS_$_CPTColor", referenced from:
objc-class-ref in HomeViewController.o
"_OBJC_CLASS_$_CPTFill", referenced from:
objc-class-ref in HomeViewController.o
"_OBJC_CLASS_$_CPTGraphHostingView", referenced from:
objc-class-ref in HomeViewController.o
"_OBJC_CLASS_$_CPTMutableLineStyle", referenced from:
objc-class-ref in HomeViewController.o
"_OBJC_CLASS_$_CPTMutableTextStyle", referenced from:
objc-class-ref in HomeViewController.o
"_OBJC_CLASS_$_CPTPieChart", referenced from:
objc-class-ref in HomeViewController.o
"_OBJC_CLASS_$_CPTPlotSymbol", referenced from:
objc-class-ref in HomeViewController.o
"_OBJC_CLASS_$_CPTScatterPlot", referenced from:
objc-class-ref in HomeViewController.o
"_OBJC_CLASS_$_CPTTextLayer", referenced from:
objc-class-ref in HomeViewController.o
"_OBJC_CLASS_$_CPTXYGraph", referenced from:
objc-class-ref in HomeViewController.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
How can I fix this problem?
Thank you
Combine both libraries and make a universal binary
lipo -create <simulator_lib>.a <device_lib>.a -output lib.a
Open the Core Plot iOS project (CorePlot-CocoaTouch.xcodeproj), update the architecture build settings to include 64-bit, and build the "Universal Library" target. This will create a folder called "Release-universal" in your build folder containing a universal library with all architectures (device and simulator) and copies of all of the header files.
I'm using Cocoapod to get Global Lib. It works fine in the simulator, but it has some error when I build on my device:
Undefined symbols for architecture armv7s:
"_OBJC_CLASS_$_FBRequest", referenced from:
objc-class-ref in HomeViewController.o
"_OBJC_CLASS_$_SBJsonParser", referenced from:
objc-class-ref in IQRequest.o
"_AFNetworkingOperationFailingURLResponseErrorKey", referenced from:
___78-[IQRequest performQueueOperationWithRequest:withSuccessBlock:andFailedBlock:]_block_invoke39 in IQRequest.o
"_OBJC_CLASS_$_AFHTTPRequestOperation", referenced from:
objc-class-ref in IQRequest.o
"_OBJC_CLASS_$_AFHTTPClient", referenced from:
objc-class-ref in IQRequest.o
"_OBJC_CLASS_$_FBSession", referenced from:
objc-class-ref in ChooseDesignerViewController.o
objc-class-ref in IQUser.o
objc-class-ref in IQAppDelegate.o
ld: symbol(s) not found for architecture armv7s
clang: error: linker command failed with exit code 1 (use -v to see invocation)
What has happened to my project?
It seems like your library isn't compiled for armv7s. If it's distributed as binary you'll have to ask the maintainer to rebuild it with an armv7s slice. If it's distributed as source code you have to check the projects build settings. I think you should look for valid architectures or something like that.