iosboostlipo

Library fat file not work


I'm trying to use fat file for Boost 1.54.0 in my iOS project. Here is info about result file from lipo -detailed_info command:

Fat header in: boost.framework/boost
fat_magic 0xcafebabe
nfat_arch 5
architecture armv7
    cputype CPU_TYPE_ARM
    cpusubtype CPU_SUBTYPE_ARM_V7
    offset 108
    size 2963176
    align 2^2 (4)
architecture armv7s
    cputype CPU_TYPE_ARM
    cpusubtype CPU_SUBTYPE_ARM_V7S
    offset 2963284
    size 3079048
    align 2^2 (4)
architecture i386
    cputype CPU_TYPE_I386
    cpusubtype CPU_SUBTYPE_I386_ALL
    offset 8916872
    size 2830880
    align 2^2 (4)
architecture x86_64
    cputype CPU_TYPE_X86_64
    cpusubtype CPU_SUBTYPE_X86_64_ALL
    offset 11747752
    size 3015296
    align 2^2 (4)
architecture arm64
    cputype CPU_TYPE_ARM64
    cpusubtype CPU_SUBTYPE_ARM64_ALL
    offset 6042332
    size 2874540
    align 2^2 (4)

When I try to build for real device (iPad Mini Retina, arm64) I'm getting link error:

ld: archive has no table of contents file 'boost.framework/boost' for architecture arm64

I could build for armv7 simulator without errors. What could be a reason of the error?


Solution

  • I had the same problem and fixed it this way:

    ranlib yourlibrary.a