Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

File is universal (three slices), but it does not contain a(n) ARMv7-s slice error for static libraries on iOS, anyway to bypass?

I upgraded Xcode version and when using external static libraries, I get this message:

ld: file is universal (3 slices) but does not contain a(n) armv7s slice: /file/location for architecture armv7s clang: error: linker command failed with exit code 1 (use -v to see invocation)

Is there any way to bypass this and add support to the library if the developer of the library hasn't updated their library yet?

like image 967
Dafna Elazazer Avatar asked Sep 13 '12 08:09

Dafna Elazazer


3 Answers

If you want to remove the support for any architecture, for example, ARMv7-s in your case, use menu Project -> Build Settings -> remove the architecture from "valid architectures".

You can use this as a temporary solution until the library has been updated. You have to remove the architecture from your main project, not from the library.

Alternatively, you can set the flag for your debug configuration's "Build Active Architecture Only" to Yes. Leave the release configuration's "Build Active Architecture Only" to No, just so you'll get a reminder before releasing that you ought to upgrade any third-party libraries you're using.

like image 54
Nicholas Avatar answered Nov 16 '22 02:11

Nicholas


I've simply toggled "Build Active Architecture Only" to "Yes" in the target's build settings, and it's OK now!

like image 190
Blasco73 Avatar answered Nov 16 '22 00:11

Blasco73


Try to remove armv7s from project's "Valid architecture" to release from this issue for iOS 5.1 phone

like image 27
Arthur Jen Avatar answered Nov 16 '22 02:11

Arthur Jen