简体   繁体   English

Xcode:Apple Mach-O链接器错误

[英]Xcode : Apple Mach-O linker Error

I made the app in Xcode 4.6 and tested in device. 我在Xcode 4.6中制作了该应用,并在设备中进行了测试。 The app is made for both iPhone and iPad. 该应用程序适用于iPhone和iPad。 When I try to archive it to make .ipa file, I get this error : 当我尝试将其存档以制作.ipa文件时,出现此错误:

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. 需要为armv7s体系构建libzbar.a库。 If you cannot do that (because you don't have source code for this library) than you should remove armv7s from valid architectures. 如果您不能这样做(因为您没有该库的源代码),则应该从有效架构中删除armv7。 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 更改有效架构字段

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM