0

armeabi-v7a と x86 の両方の共有ライブラリとして Android 用の libcurl を正常にビルドしました。プロジェクトの 1 つがそれに依存しています。「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 は機能しません。

4

1 に答える 1

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

終わり。

于 2013-06-15T22:59:12.487 に答える