Android的NDK编译GMP库 [英] Android NDK compile gmp library
本文介绍了Android的NDK编译GMP库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何编译GMP为Android NDK作为我可以在我的项目重复使用静态或共享库/
How to compile GMP for android ndk as a static or shared library that I can reuse in my projects/
推荐答案
我不知道,如果GMP使用autoconf但如果它不那么你可以尝试以下方法:
I don't know if GMP use autoconf but if it does then you can try the following:
您需要按照指示
Android的NDK-R6 /文档/ STANDALONE-TOOLCHAIN.html
3 /调用编译器(图省事)
you will need to follow instruction android-ndk-r6/docs/STANDALONE-TOOLCHAIN.html 3/ Invoking the compiler (the easy way)
假设你已经定义$ NDKROOT指向NDK的根
Assuming that you have defined $NDKROOT to point to root of NDK
$NDKROOT/build/tools/make-standalone-toolchain.sh --platform=android-9 --install-dir=$NDKROOT/android_armeabi
export CC="$NDKROOT/android_armeabi/bin/arm-linux-androideabi-gcc --sysroot=$NDKROOT/android_armeabi/sysroot"
export CXX="$NDKROOT/android_armeabi/bin/arm-linux-androideabi-g++ --sysroot=$NDKROOT/android_armeabi/sysroot"
export AR="$NDKROOT/android_armeabi/bin/arm-linux-androideabi-ar"
export SYSROOT="$NDKROOT/android_armeabi/sysroot"
export PATH="$NDKROOT/android_armeabi/bin":$PATH
./configure --host=arm-linux-androideabi
我是能够编译各种开源库与这个食谱。祝你好运!
I was able to compile various open source libs with this recipe. Good luck!
这篇关于Android的NDK编译GMP库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文