Xcode 4 Final - “armv6 armv7” issue while linking with armv6 libs

前端 未结 5 1281
一向
一向 2020-12-05 05:26

Until xcode 4 final (I was using 3.latest and 4 GM for the time it was available) this didn\'t happen. When I upgraded to xcode 4 final version, I started getting a linking

相关标签:
5条回答
  • 2020-12-05 05:53

    In iOS SDK 4.3, it looks like the linker will simply refuse to use a armv6 library in an armv7 binary - this wasn't the case before.

    That's why I had to update the http://code.google.com/p/ios-static-libraries/ project to generate both armv6 and armv7 versions of the libraries.

    0 讨论(0)
  • 2020-12-05 05:53

    I have added 3rd Party framework with some demo classes into project but once implemented it successfully I removed those demo classes and since then the error started coming up Error "ld: ........., file is universal but does not contain a(n) armv6 slice for architecture armv6"

    After scratching my head for a whole day I found this solution next morning maybe helpful for fellow iphone buddies coz I know the pain

    Targets->"Your Project Target"-> Get Info ->Build Active Architecture only set to YES

    Thats it..

    0 讨论(0)
  • 2020-12-05 06:03

    I just turned the Build active architecture only to Yes in the Project -> Build Setting -> Architectures tab.

    0 讨论(0)
  • 2020-12-05 06:12

    Although I still don't know why this started happening only in the xcode 4 final version, I found that my external libs (ssl and crypto) were compiled against both armv6 and armv7 in the google code project very few days ago:

    http://code.google.com/p/ios-static-libraries/

    This will fix the issue if you define two different library search path: one for armv6, one for armv7.

    Thanks,

    0 讨论(0)
  • 2020-12-05 06:15

    Had the same problem. But the reason was different I suppose. I was using the library.a file built for simulator and trying to run it on device.. came to know that i need different .a files for simulator and device. I hope this helps someone ;)

    0 讨论(0)
提交回复
热议问题