Linking with versioned shared library in Android NDK

后端 未结 3 1988
我在风中等你
我在风中等你 2021-02-04 18:57

I am trying to load two shared libraries in my Android application through the loadLibrary call:

System.loadLibrary(\"mywrapper\");
System.loadLibra         


        
3条回答
  •  心在旅途
    2021-02-04 19:22

    It seems android has an issue with loading versioned libraries.The issue at hand was because of library so-name in my case libcrypto.so.1.0.0. Even if you rename the library and try to load it as a prebuilt shared library in an android make file it fails.( It has to be because the library name is somehow embedded in the file. And any library that links with it expects to be linked with a library of with the same name )

    I hope there are other ways out there when it comes to handling libraries with version names in android.

    For now I am evading the problem all together by using static libraries of openssl and linking them with my own shared library.

提交回复
热议问题