简体   繁体   中英

Creating Universal Library in Xcode 6

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM