2013-05-10 45 views
0

我已经成功为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会在构建之前清除此目录。Android NDK - 在哪里放置LOCAL_SHARED_LIBRARIES中指定的.so文件?

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

回答

1

简单,按照此,从http://curl.haxx.se/

- 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 

完成下载卷曲源。