Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Building New Qt project with Cmake for Android under Windows10 Fails



  • Hello,

    I've made the following steps into building a project for Android, but something is not good:

    Environment:
    Qt Creator 4.8.2 (enterprise)
    Windows 10 x64
    Qt5.12.2

    File -> New Project-> Qt Quick Application - Swipe -> Build System CMake -> Minimal qt 5.9 -> Select Kids : Android for arm64-v8a (Clang QAt 5.12.2 for Android ARM64-v8a)

    And I get the following Error:

    Check for working CXX compiler: C:/android-ndk-r19c/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe
    Check for working CXX compiler: C:/android-ndk-r19c/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe -- broken
    CMake Error at C:/Program Files/CMake/share/cmake-3.14/Modules/CMakeTestCXXCompiler.cmake:53 (message):
      The C++ compiler
    
        "C:/android-ndk-r19c/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe"
    
      is not able to compile a simple test program.
    
      It fails with the following output:
    
        Change Dir: C:/Users/flavianma/AppData/Local/Temp/QtCreator-uoxAAp/qtc-cmake-ctDRkyeF/CMakeFiles/CMakeTmp
        
        Run Build Command(s):jom /nologo cmTC_be3a3\fast 
        jom: parallel job execution disabled for Makefile
        	C:\Qt\Qt5.12.2\Tools\QtCreator\bin\jom.exe -f CMakeFiles\cmTC_be3a3.dir\build.make /nologo -L CMakeFiles\cmTC_be3a3.dir\build
        Building CXX object CMakeFiles/cmTC_be3a3.dir/testCXXCompiler.cxx.obj
        	C:\android-ndk-r19c\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe     -o CMakeFiles\cmTC_be3a3.dir\testCXXCompiler.cxx.obj -c C:\Users\flavianma\AppData\Local\Temp\QtCreator-uoxAAp\qtc-cmake-ctDRkyeF\CMakeFiles\CMakeTmp\testCXXCompiler.cxx
        Linking CXX executable cmTC_be3a3.exe
        	"C:\Program Files\CMake\bin\cmake.exe" -E remove -f CMakeFiles\cmTC_be3a3.dir/objects.a
        	CMAKE_AR-NOTFOUND cr CMakeFiles\cmTC_be3a3.dir/objects.a @CMakeFiles\cmTC_be3a3.dir\objects1.rsp
        'CMAKE_AR-NOTFOUND' is not recognized as an internal or external command,
        operable program or batch file.
    

    Also, I have the kits well configured:

    0_1556809711335_Qt_Devices.jpg

    I couldn't find anything relevant on the web regarding this, maybe someone stumbled into the same problem

    Best regards,
    Flavian


Log in to reply