3

I updated my iphone4s and xcode to the latest yesterday. And I'm trying to debug my app on my phone since my application uses hardware communication. I'm using a third party library from Redpark(the company provides Dock to RS232 wire.) While compiling, it gives an error

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

Does anyone know how to solve this except waiting for Redpark to update there library?

user1491987
  • 751
  • 1
  • 14
  • 34

2 Answers2

16

You can simply disable the compilation of armv7s in your Build Settings, by replacing the $VALID_ARCHITECTURES (which evaluates to armv7 armv7s now) value by the explicit value armv7.

Thus your application will only build for armv7 and not armv7s, so will not be fully optimized for the new iPhone5, but it will still run on iPhone 4 and 5 anyway (the armv7s processor of the iPhone 5 can execute armv7 applications, it is just not as optimized as with armv7s processor dedicated instructions)

AliSoftware
  • 32,623
  • 6
  • 82
  • 77
  • 1
    Thank you. I tried it, it works. I also found that by changing BUILD ACTIVE ARCHITECTURE ONLY to NO works too. – user1491987 Sep 21 '12 at 16:34
  • If this solves your question, don't forget to tick the checkmark near my answer to mark your question as solved for other visitors. – AliSoftware Sep 21 '12 at 17:07
3

I did another search and found two solutions work for me. Dafna 1. Go to Target Setting -> Build Settings -> Build Active Architecture Only -> change to NO. 2. Still in Build Settings -> Valid Architecture -> delete armv7s.

They both work for me. If you have the same problem, definitely try this first.

Community
  • 1
  • 1
user1491987
  • 751
  • 1
  • 14
  • 34