简体   繁体   中英

Xcode : Apple Mach-O linker Error

I made the app in Xcode 4.6 and tested in device. The app is made for both iPhone and iPad. When I try to archive it to make .ipa file, I get this error :

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

How to set the architecture for this in Build Settings? Or is there some different issue?

libzbar.a library needs to be built for armv7s architecture. If you cannot do that (because you don't have source code for this library) than you should remove armv7s from valid architectures. You can change valid architectures by following steps:

  • select project name from the Project Navigator
  • select project target
  • open Build Settings tab
  • change valid architectures field

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