Tôi đang sử dụng nguồn mở ssl được cung cấp tại https://github.com/eighthave/openssl-android để xây dựng thư viện có thể được sử dụng trong dự án Android.Xây dựng thư viện Android mở cho nền tảng 2.1
Theo hướng dẫn được đưa ra tại README.txt, tôi có thể biên dịch nó cho phiên bản nền tảng Android 2.2 (mức -8)
Nhưng ứng dụng của tôi đòi hỏi nó là 2.1 (mức -7) tương thích.
tôi đã cố gắng lựa chọn với default.properties tập tin (https://github.com/eighthave/openssl-android/blob/master/default.properties)
1) thiết lập target = android-7
2) đặt mục tiêu sau đây = android-5
Nhưng khi tôi biên dịch nó sử dụng lệnh ndk-build, nó cung cấp lỗi sau
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
Theo thông báo lỗi- Dl_info không được xác định. nhưng nếu chúng ta đi đến tập tin dso_dlfcn.c, định nghĩa cho cấu trúc đã được cung cấp. (https://github.com/eighthave/openssl-android/blob/master/crypto/dso/dso_dlfcn.c)
Và mã này được biên dịch cho target = android-8 trong tệp thuộc tính mặc định chứ không phải cho android-7 hoặc android-5.
Yêu cầu bạn giúp tôi giải quyết lỗi này. và cho tôi biết tất cả những thay đổi cần được thực hiện để biên dịch nó cho nền tảng Android 2.1.
Xin cảm ơn trước.
Bạn cũng có [OpenSSL và Android] (https: // wiki.openssl.org/index.php/Android) trên wiki OpenSSL. – jww