【问题标题】:Android NDK - Where to put the .so file which specified in LOCAL_SHARED_LIBRARIES?Android NDK - 将 LOCAL_SHARED_LIBRARIES 中指定的 .so 文件放在哪里?
【发布时间】:2013-05-10 02:14:49
【问题描述】:

我已经成功地为 android 构建了 libcurl 作为共享库,包括 armeabi-v7a 和 x86,我的一个项目依赖于它。我设置了“LOCAL_SHARED_LIBRARIES := libcurl”,问题是我应该把那些 libcurl.so 文件放在哪里?

我尝试将它们放在 (project)/jni/lib/(platform)/libcurl.so 下,而 ndk-build 给了我一大堆链接错误。 (project)/lib/(platform)/libcurl.so 也不起作用,因为 ndk-build 会在构建之前清除该目录。

所以我再次尝试,一次构建 1 个平台,但我仍然不知道该放在哪里。 jni/libcurl.so 将不起作用。

【问题讨论】:

    标签: android-ndk makefile


    【解决方案1】:

    简单,按照这个,从http://curl.haxx.se/下载curl源码

      - prepare the toolchain of the Android NDK for standalone use; this can
        be done by invoking the script:
    
        ./build/tools/make-standalone-toolchain.sh
        which creates a usual cross-compile toolchain. Lets assume that you put
        this toolchain below /opt then invoke configure with something like:
    
        export PATH=/opt/arm-linux-androideabi-4.4.3/bin:$PATH
    
        ./configure --host=arm-linux-androideabi [more configure options]
    
        make
    

    完成。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-06-14
      • 1970-01-01
      • 1970-01-01
      • 2012-11-14
      • 2017-11-13
      • 1970-01-01
      • 1970-01-01
      • 2018-09-04
      相关资源
      最近更新 更多