zoukankan      html  css  js  c++  java
  • Lipo Making a fat static library for iOS device and simulator

    Some third party iOS library providers provide separate static library archives for simulator (i386) and device (armv6 and or armv7).

    That's a pain since you either change them manually or set the linking flags on different Xcode targets to use the appropriate library (whereas normally with libraries and frameworks you just drag it into your project and you're done).

    Instead, you can build your own fat (multi-architecture) library from the provided archives and Xcode will link against the appropriate architecture segment. 

    We achieve this using the lipo tool, eg: 

    lipo -output lib_fat.a -create -arch armv6 lib_device.a -arch l386 lib_sim.a

    If they provide two archives—one regular i386 archive (with no fat header) for the simulator and one fat archive for the device with armv6 and armv7 segments. Since the device archive headers now specify the archives already, we don't need to tell lipo anything other than the archive file name.:

    lipo -create lib_device.a lib_sim.a -output lib_fat.a

     

  • 相关阅读:
    HDU 2955 Robberies
    HDU 2546 饭卡
    poj 3628 Bookshelf 2
    poj 3624 Charm Bracelet
    celery -1
    ☀【Grunt】插件
    【MooTools】
    【Grunt】
    ↗☻【PHP与MySQL程序设计 #BOOK#】第3章 PHP基础
    【CSS】
  • 原文地址:https://www.cnblogs.com/simonshi2012/p/3046186.html
Copyright © 2011-2022 走看看