android交叉编译
export NDK_PATH_PREFIX=/home/xx/android-ndk-r10
export PATH=$NDK_PATH_PREFIX/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86/bin:$PATH
export LDFLAGS="-L$NDK_PATH_PREFIX/platforms/android-9/arch-arm/usr/lib/ -L$NDK_PATH_PREFIX/sources/cxx-stl/gnu-libstdc++/4.8/libs/armeabi-v7a/"
export LIBS="$NDK_PATH_PREFIX/sources/cxx-stl/gnu-libstdc++/4.8/libs/armeabi-v7a/libsupc++.a"
export LIBS="$NDK_PATH_PREFIX/sources/cxx-stl/gnu-libstdc++/4.8/libs/armeabi-v7a/libgnustl_static.a -lc -lm"
export CPPFLAGS="-I$NDK_PATH_PREFIX/platforms/android-9/arch-arm/usr/include"
export CPPFLAGS="$CPPFLAGS -I$NDK_PATH_PREFIX/sources/cxx-stl/gnu-libstdc++/4.8/include"
export CPPFLAGS="$CPPFLAGS -I$NDK_PATH_PREFIX/sources/cxx-stl/gnu-libstdc++/4.8/libs/armeabi-v7a/include"
export CPPFLAGS="$CPPFLAGS --sysroot=$NDK_PATH_PREFIX/platforms/android-9/arch-arm"
export CFLAGS=--sysroot=$NDK_PATH_PREFIX/platforms/android-9/arch-arm
export CXXFLAGS=--sysroot=$NDK_PATH_PREFIX/platforms/android-9/arch-arm
./configure --prefix=$PWD/_install_android --host=arm-linux-androideabi
make clean
make && make install
本文地址:https://blog.csdn.net/d_l_u_f/article/details/109376510
上一篇: 孙空空的Vue之路-Day07-事件处理