Skip to content
  • 1 Votes
    2 Posts
    263 Views
    Mr. KozmonM

    I have been looking for the same thing, but unfortunately the Qt Company does not seem to offer a documentation on the subject just yet. I had to go through the Qt's source codes, but finally found a solution:

    Assuming your host OS is Windows x86_64 and you want to compile Windows arm64 packages for your project.

    Install both versions (arm64, x86_64) of Qt and MSVC (make sure you select arm64 packages when you are installing MSVC on Visual Studio Installer; not arm). Compile your project with the following commands (on cmd.exe):cd your_project_folder call "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsamd64_arm64.bat" C:\Qt\6.8.0\msvc2022_arm64\bin\qt-cmake.bat -S . -B build-arm64 -G Ninja -DQT_HOST_PATH=C:\Qt\6.8.0\msvc2022_64 -DCMAKE_BUILD_TYPE=Release cmake --build build-arm64 --parallel --config Release

    Assuming you are using Ninja as the generator (but you can remove -G Ninja if you don't)

    Deploy your project with windeployqt by passing --qtpaths option like below (on cmd.exe):C:\Qt\6.8.0\msvc2022_64\bin\windeployqt.exe --qtpaths "C:\Qt\6.8.0\msvc2022_arm64\bin\qtpaths.bat" ...

    So we are using windeployqt.exe from the msvc2022_64 setup, but letting it use the msvc2022_arm64 setup while deploying the dependencies by passing the --qtpaths argument.

    I have built my project with that but was not able to test it on an arm64 machine yet, so please let us know if it works.

    Edit 1: Apparently this requires that your Qt installation do reside in C:\Qt path. If your Qt installation path is different than that, you may try to circumvent this problem by editing out the paths listed in ...msvc2022_arm64\bin\target_qt.conf file.

    Edit 2: There seems to be a bug in the Qt 6.8.0 win64_msvc2022_arm64_cross_compiled setup (i.e., I realized it when I installed it via the aqtinstall tool on my CI machine; but there was no such bug when I installed the same Qt setup to my personal computer using official Qt installation tool a few days back.) Make sure the path to your x64 setup inside the C:\Qt\6.8.0\msvc2022_arm64\bin\qtpaths.bat file is correct (edit the bat file if it contains the wrong path due to the bug I just mentioned).

    Hope it helps.

  • 0 Votes
    1 Posts
    111 Views
    No one has replied
  • 0 Votes
    1 Posts
    278 Views
    No one has replied
  • 0 Votes
    18 Posts
    5k Views
    R

    @jsulm Thanks I will follow the link.

  • 0 Votes
    2 Posts
    734 Views
    K

    Not sure about Qt 5.10, but Qt 5.12 have support for arm64-v8a target. You will need to build two APK files, one for armeabi-v7a, and one for arm64-v8a, with different versionCode values in manifest, and then just publish both in the same release.

  • 0 Votes
    7 Posts
    4k Views
    SGaistS

    AFAIK, the BPI is very close to the Raspberry Pi, you should take a look at this wiki entry.

    By the way, why are you trying to build an outdated version of Qt ? The current LTS is the 5.9 series with 5.12 around the corner.

  • 0 Votes
    8 Posts
    14k Views
    D
    friend tell me what should I do, really apt get can put qt or you built from src, and direct me if I need this thing for developers, where to put the sources, I have arm64 linux @bruce_the_great