小编Sus*_*hil的帖子

为平台2.1构建Android-openssl库

我使用https://github.com/eighthave/openssl-android给出的open-ssl源 来构建一个可以在android项目中使用的库.

根据README.txt中给出的说明,我可以为Android平台版本2.2(级别-8)编译它

但我的应用程序要求它与2.1(级别-7)兼容.

我尝试使用default.properties文件执行以下选项(https://github.com/eighthave/openssl-android/blob/master/default.properties)

1)设置target = android-7

2)设置target = android-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: …
Run Code Online (Sandbox Code Playgroud)

java-native-interface android openssl shared-libraries android-ndk

6
推荐指数
1
解决办法
2295
查看次数