I have tried several options but still didn't link the libraries successfully. I have Qt Android CMake application and I need to link the libssl and libcrypto libraries. I have placed them in the poject /android_openssl/ANDROID_ABI/lib/ and for each ABI i have this:
And also the include folder is next to the abi folders. I have tried this solutions but I end up without this libraries to be linked:
I tried this possible solution and I got error:
add_library(ssl STATIC IMPORTED) add_library(crypto STATIC IMPORTED) set_target_properties(ssl PROPERTIES IMPORTED_LOCATION ${CMAKE_CURRENT_SOURCE_DIR}/android_openssl/${ANDROID_ABI}/lib/libssl.a) set_target_properties(crypto PROPERTIES IMPORTED_LOCATION ${CMAKE_CURRENT_SOURCE_DIR}/android_openssl/${ANDROID_ABI}/lib/libcrypto.a) add_library(MyApp SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS} ${PROJECT_RESOURCES} ) target_link_libraries(MyApp PRIVATE ssl crypto Qt5::Core Qt5::Quick Qt5::QuickControls2 Qt5::Sql Qt5::Network Qt5::Svg ) Error:
E linker : library "/system/lib/libcrypto.so" ("/system/lib/libcrypto.so") needed or dlopened by "/data/app/~~Xp7o_GB4MNRnsRrBx8X1Pw==/org.qtproject.example-VZ3Vyyfp8FGD1_RYb2Soug==/lib/x86/libQt5Core_x86.so" is not accessible for the namespace: [name="classloader-namespace", ld_library_paths="", default_library_paths="/data/app/~~Xp7o_GB4MNRnsRrBx8X1Pw==/org.qtproject.example-VZ3Vyyfp8FGD1_RYb2Soug==/lib/x86:/data/app/~~Xp7o_GB4MNRnsRrBx8X1Pw==/org.qtproject.example-VZ3Vyyfp8FGD1_RYb2Soug==/base.apk!/lib/x86", permitted_paths="/data:/mnt/expand:/data/user/0/org.qtproject.example"] W libMyApp_x86.so: qt.network.ssl: QSslSocket::connectToHostEncrypted: TLS initialization failed Can you please tell me what I am doing wrong? I have found so much resources on this topic but still I am doing something wrong.
Also, I see that here I have static libraries for each abi .a and also I see .so.1.1. So which one I should link?

libcrypto.sotolibcrypto.so.1.1