1

I want to use the libCorePlot-CocoaTouch.a in order to make a graph of data but I kept getting a Mac-o Linker error from Core Plot. Seemed that the error was because I do not have a Universal Library for all of the architectures. From what I have read, is that the Core Plot library needs to be combined with the iphone and simulator libraries. Please correct me as I am very new to Obj-C.

I have tried using the following scripts with target/aggregate but none of them Link 1 Link 2 work with Xcode 6, the issues are the following: Lipo: can't open input file: /Users/Wilbe1/Library/Developer/Xcode/DerivedData/GeoData_Grapher-blnjuxtseitfkfdfkgjpgzskbtwx/Build/Products/Debug-iphoneos/libGeoData Grapher.a (No such file or directory)

Cp: /Users/Wilbe1/Library/Developer/Xcode/DerivedData/GeoData_Grapher-blnjuxtseitfkfdfkgjpgzskbtwx/Build/Products/Debug-iphoneos/include: No such file or directory

Do I need to make a static library first and then a Universal? Could someone please give me a step by step instruction how to resolve this problem.

1 Answer 1

2

You have to build your library for all the different architectures, then merge them with lipo like this :

lipo -create “lib_arm64.a” “lib_x86_64.a” “lib_armv7.a” “lib_armv7s.a” -output “lib.a”

This is how I do it personaly.

Sign up to request clarification or add additional context in comments.

7 Comments

How do I build a library for all of the architectures you indicated?
You open Xcode with your project, and then build it for simultator x86, simulator 64, device x86, device 64. You'll have 4 .a after this. Between each compilation, check your product folder and copy/rename tghe .a in another folder to prevent erase by the other generated.
I tried building it with the different simulators but due to the Mac linker errors coming from the Core Plot Lib it does not want to build, I can't find the .a files in the products folder would that be because it does not build? I will make a new project and then build all of the simulators maybe that works
Ok I created the different lib.a files and they saved under product folder as described. I tried to merge them but lipo is looking for a directory how do I tell it where to look?
To run the command as I wrote it, you have to be in the directory where lay the libraries.
|

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.