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

     

  • 相关阅读:
    进程池和线程池
    TCP并发、GIL、锁
    进程间通信
    装饰器与反射
    装饰器大全
    面向对象三大特征: 封装 继承 多态
    面向对象 魔术方法
    魔术方法
    ubuntu 中导 tarfile,win 不亲切
    os VS shutil
  • 原文地址:https://www.cnblogs.com/simonshi2012/p/3046186.html
Copyright © 2011-2022 走看看