我正在尝试在iOS项目中将胖文件用于Boost 1.54.0。这是有关lipo -detailed_info命令的结果文件的信息:

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)

当我尝试为真实设备(iPad Mini Retina,arm64)构建时,出现链接错误:
ld: archive has no table of contents file 'boost.framework/boost' for architecture arm64

我可以为armv7模拟器构建而不会出错。错误的原因可能是什么?

最佳答案

我遇到了同样的问题,并通过以下方式解决了问题:

ranlib yourlibrary.a

08-25 08:18