我正在尝试为 Android 的 OpenSSL1.0.1c 的 (.so) 文件生成共享库。我发现他们在 android 脚本中添加了三个用于编译 Android 的选项。
./Configure android-armv7 (or)
./Configure android-x86 (or)
./Configure android
一旦我为操作系统配置然后尝试编译,它就会抛出错误。目前我正在使用 x86 windows7 并安装了 Cygwin、Android sdk R20、Android NDK r8
sh-4.1$ make
making all in crypto...
make[1]: Entering directory `/cygdrive/d/SourceCodes/OpenSSL/openssl-1.0.1c/crypto'
gcc -I. -I.. -I../include -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -march=armv7-a -mandroid -I/include -B/lib -O3 -fomit-frame-pointer -Wall -DOPENSSL_BN_ASM_MONT -DOP
ENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DAES_ASM -DGHASH_ASM -c -o cryptlib.o cryptlib.c
cc1: error: unrecognized command line option "-mandroid"
cryptlib.c:1:0: error: bad value (armv7-a) for -march= switch
<builtin>: recipe for target `cryptlib.o' failed
make[1]: *** [cryptlib.o] Error 1
make[1]: Leaving directory `/cygdrive/d/SourceCodes/OpenSSL/openssl-1.0.1c/crypto'
Makefile:278: recipe for target `build_crypto' failed
make: *** [build_crypto] Error 1
sh-4.1$
请让我知道是否有人遇到过类似的问题并获得解决相同问题的解决方案。