我使用qmake为我的本机库生成make文件(只生成make文件,不使用Qt库)。
qt只支持android armv5,armv7和x86,所以当我使用上面任何qt包中的qmake构建我的库时,我只能构建armv5,armv7和x86库。
有没有办法为qmake指定另一个目标架构(例如mips的arm64)?
答案 0 :(得分:0)
你需要自己构建arm64-v8a库,
并使用arm64-v8a qmake构建自己的库。
这是mac build version
git clone git://code.qt.io/qt/qt5.git qt5
cd qt5
perl init-repository
./configure \
-confirm-license \
-opensource \
-xplatform android-g++ \
-nomake tests \
-nomake examples \
-android-ndk /usr/local/Cellar/android-ndk/r10e \
-android-sdk ~/Documents/android-sdk-macosx \
-android-ndk-host darwin-x86_64 \
-android-toolchain-version 4.9 \
-android-arch arm64-v8a \
-android-ndk-platform android-21 \
-skip qtdeclarative \
-skip qttranslations \
-skip qtserialport \
-no-warnings-are-errors \
-no-compile-examples \
-no-sql-mysql \
-no-sql-psql \
-prefix ~/Documents/Qt/android_arm64-v8a \
-prefix-install \
-openssl \
-I /usr/local/Cellar/openssl/1.0.2k/include -L /usr/local/Cellar/openssl/1.0.2k/lib
make -j4
make -j4 install
你也可以在这里下载arm64-v8a库:https://github.com/LightZam/Qt-Library