Zbar SDK - missing required architecture x86_64

前端 未结 6 1631
隐瞒了意图╮
隐瞒了意图╮ 2021-01-30 18:58

I had one problem during building application in the recent Xcode 5.1. Compilation fails with \"Undefined symbols for architecture x86_64\" error.

I build my project wit

6条回答
  •  伪装坚强ぢ
    2021-01-30 19:48

    Recompile ZBar for iphone 6

    Steps

    Download the source code (you must have Mercurial for mac):

    Open Terminal and run following commands

    a. hg clone http://zbar.hg.sourceforge.net:8000/hgroot/zbar/zbar

    b. cd zbar

    c. hg checkout iPhoneSDK-1.3.1

    d. open iphone/zbar.xcodeproj

    In the xcode project edit the "libzbar" scheme and select Release in Build configuration

    Go to Build Settings set following Architectures

    a. Architectures - >Standard architectures(armv7,armv72,arm64)

    b. Valid Architectures -> arm64,armv7 armv7s

    Compile libzbar for device AND for simulator, here the configuration:

    Find the compiled libzbar.a and go in the folder using Teminal.app,

    In My Case : /Users/kappe/Library/Developer/Xcode/DerivedData/zbar-gyozyrpbqzvslmfoadhqkwskcesd/Build/Products

    In this folder you you should have two sub folder Release-iphoneos and Release-iphonesimulator

    using xcode command line tools build your universal lib:

    lipo -create Release-iphoneos/libzbar.a Release-iphonesimulator/libzbar.a -o libzbar.a

    Now you can use the libzbar.a created, both in device and simulator.

    Ref: xcode 5.1 - Undefined symbols for architecture x86_64 (zbar)

提交回复
热议问题