Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS - Linker error after upgrading to Xcode 4.5, possibly Core Plot related

I've just upgraded to Xcode 4.5GM and tidied up some screens in my iPhone project to cope with the extra screen size on iPhone 5. The project is targeting iOS 5.1 and I've just come to build it for my phone and I get this linker error :

file is universal (2 slices) but does not contain a(n) armv7s slice: /Users/JonathanW/Documents/MyXcode/myApp/myApp/CorePlot/libCorePlot-CocoaTouch.a for architecture armv7s

I'm using the Core Plot 1.0 static library in my project and have not had any issues with it until now. Looking around I can see similar errors to do with the build architecture settings but not sure where to go from here. The project works fine in the simulator (both iOS 5.1 and iOS 6). Any ideas?

like image 537
Jonathan Wareham Avatar asked Sep 13 '12 16:09

Jonathan Wareham


2 Answers

By the looks of it you'll need to rebuild the libCorePlot library with Xcode 4.5GM so that there's a ARMV7S build of the library. Seems as if it's trying to use the version you built with the older Xcode.

like image 144
Ben Clayton Avatar answered Oct 16 '22 18:10

Ben Clayton


I'm also using the Core Plot 1.0 static library in my project. I was able to address the problem by Setting Build Active Architectures Only to Yes. Build Active Architectures Only is in the Architecture section of the Target's Build Settings in Xcode.

I downloaded the Core Plot 1.0 zip file which seems to be incomplete so I cannot rebuild the libraries.

like image 31
JSWilson Avatar answered Oct 16 '22 18:10

JSWilson