Deepak Thakur
Deepak Thakur

Reputation: 3701

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?

Upvotes: 0

Views: 2081

Answers (1)

JPetric
JPetric

Reputation: 3918

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

Upvotes: 3

Related Questions