I have build libcrypto.a
and libssl.a
myself from source, specifying darwin64-x86_64-cc
(for 64-bit) and darwin-i386-cc
(for 32-bit) to OpenSSL
's configure script.
Created the fat libraries with lipo
and added them as a dependency in my Xcode
project.
However, I'am getting an undefined symbol error:
undefined symbols for architecture x86_64:
"_OPENSSL_ia32cap_P", referenced from:
_AES_cbc_encrypt in libcrypto.a(aes-x86_64.o)
ld: symbol(s) not found for architecture x86_64
Note: Using the same technique works fine for iOS, though.
lipo -detailed_info libcrypto.a
reveals:
Fat header in: libcrypto.a
fat_magic 0xcafebabe
nfat_arch 2
architecture i386
cputype CPU_TYPE_I386
cpusubtype CPU_SUBTYPE_I386_ALL
offset 48
size 2700624
align 2^2 (4)
architecture x86_64
cputype CPU_TYPE_X86_64
cpusubtype CPU_SUBTYPE_X86_64_ALL
offset 2700672
size 3938432
align 2^2 (4)