dylib for iPhone 3.1.2 is too short, wrong cputype/cpusubtype
I've been trying to compile a dylib to use in 开发者_开发百科a little prototyping experiment however dlopen() says that my dylib is Mach-O but that the file is too short. Should it be padded with something?
I have the latest everything so that shouldn't be a problem.
lipo spits this out when I try to merge the i386 and armv6 arch's together:
lipo: specifed architecture type (armv6) for file (libTest.A.armv6.dylib) does not match it's cputype (7) and cpusubtype (3) (should be cputype (12) and cpusubtype (6))
Any thoughts?
See /usr/include/mach/machine.h, which (in particular) contains
#define CPU_TYPE_X86 ((cpu_type_t) 7)
#define CPU_SUBTYPE_I386_ALL CPU_SUBTYPE_INTEL(3, 0)
This suggests that libTest.A.armv6.dylib is actually an i386 library.
精彩评论