我使用的是open-ssl源码,在https://github.com/eighthave/openssl-android 构建了一个可以在android项目中使用的库。为平台2.1构建Android-openssl库
按在README.txt中给出的指示,我能够编译它的Android平台版本2.2(级-8)
但我的应用程序需要它是2.1(级-7)兼容。
我试图在与default.properties文件(https://github.com/eighthave/openssl-android/blob/master/default.properties)
1)设定的目标=机器人-7
2)设定的目标选项=机器人-5-
但是,当我编译它使用命令ndk-build,它给出以下错误
Compile thumb : crypto <= dsa_vrf.c
Compile thumb : crypto <= dso_dl.c
Compile thumb : crypto <= dso_dlfcn.c
/Crypto/openssl-android/crypto/dso/dso_dlfcn.c: In function 'dlfcn_pathbyaddr':
/Crypto/openssl-android/crypto/dso/dso_dlfcn.c:445: error: 'Dl_info' undeclared (first use in this function)
/Crypto/openssl-android/crypto/dso/dso_dlfcn.c:445: error: (Each undeclared identifier is reported only once
/Crypto/openssl-android/crypto/dso/dso_dlfcn.c:445: error: for each function it appears in.)
/Crypto/openssl-android/crypto/dso/dso_dlfcn.c:445: error: expected ';' before 'dli'
/Crypto/openssl-android/crypto/dso/dso_dlfcn.c:455: error: 'dli' undeclared (first use in this function)
make: *** [obj/local/armeabi/objs/crypto/dso/dso_dlfcn.o] Error 1
根据错误消息 - Dl_info未定义。但如果我们转到文件dso_dlfcn.c,则已经提供了该结构的定义。 (https://github.com/eighthave/openssl-android/blob/master/crypto/dso/dso_dlfcn.c)
而这段代码在默认属性文件中编译为target = android-8,但不适用于android-7或android-5。
请求你帮我解决这个错误。并让我知道为了将其编译为android 2.1平台而需要做的所有更改。
在此先感谢。
你也有[OpenSSL和安卓(https://开头wiki.openssl.org/index.php/Android)。 – jww