QT5.1 FOR ANDROID 安装配置

 

Building Qt/Android on Windows

Tested last time on stable-a4d41f6 2013-06-19

Note, it is not currently possible to use Microsoft’s compilers to build the Windows host tools for Qt Android.

—————————— Configuration ——————————

  • Install the latest Perl:
    http://strawberryperl.com/
    Select Destination folder (we’ll call this <PERL_ROOT>, and refer similarly to other install locations).
  • Open cmd.exe window and perform some checks:
    Ensure “where gcc.exe” lists <MINGW_ROOT>\bin\gcc.exe first (before <PERL_ROOT>\c\bin\gcc.exe)
    Ensure “where mingw32-make.exe” lists <MINGW_ROOT>\bin\mingw32-make.exe first.
    Ensure “where perl.exe” lists <PERL_ROOT>\perl\bin\perl.exe first.
    Ensure “where javac.exe” lists <JDK_ROOT>\bin first.
  • Add some environment variables:
    set “ANDROID_NDK_PLATFORM=android-9”
    set “ANDROID_TARGET_ARCH=armeabi-v7a”
    set “ANDROID_BUILD_TOOLS_REVISION=17.0.0”
    set “ANDROID_NDK_HOST=windows-x86_64”
    or
    set “ANDROID_NDK_HOST=windows”
    .. depending on which NDK you downloaded.

—————————— Cloning ——————————

  • Make the root folder for the Qt/Android build:
    Make sure there are no spaces in this path and that it doesn’t contain too many characters.
    I went for “C:\work\build”
    1. mkdir C :\work\build
    2. cd C :\work\build

—————————— Build steps ——————————

  1. configure. bat -developer -build -platform win32 -g ++ -opengl es2 -xplatform android -g ++ -android -ndk <ANDROID_NDK > -android -sdk <ANDROID_SDK > -android -toolchain -version 4.7 -opensource -confirm -license -nomake tests -nomake examples
  2. mingw32 -make. exe -j <N >

..where <N> is the number of parallel jobs your system can optimally exploit.

—————————— Finally ——————————

You can also build Qt/Android from the MSYS shell – the one from mingw-builds that you already downloaded – following much the same procedure and using exactly the same software. This is currently left as an exercise for the reader.

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值