Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Creating a new Qt Quick Application with cmake already has errors
QtWS25 Last Chance

Creating a new Qt Quick Application with cmake already has errors

Scheduled Pinned Locked Moved Solved QML and Qt Quick
4 Posts 2 Posters 399 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • pillexyz_zP Offline
    pillexyz_zP Offline
    pillexyz_z
    wrote on last edited by
    #1

    Hey!

    I'm a fairly beginner using Qt, but I can't even to manage to run a new project without issues.

    When I make a new Qt Quick Application (compat) with qmake it works fine but I can't use Qt 6.5 only 6.2 (or older).
    If I make a Qt Quick Application which only allows me to use cmake it doesn't even start.
    Honestly I have no idea why it's not working, I tried to search for a solution for hours.

    This is what I see in the general messages window:

    [cmake] Running C:\Qt\Tools\CMake_64\bin\cmake.exe -S "C:/Projects/Qt Projects/untitled" -B "C:/Projects/Qt Projects/untitled/build/Desktop_Qt_6_8_1_llvm_mingw_64_bit-Debug" in C:\Projects\Qt Projects\untitled\build\Desktop_Qt_6_8_1_llvm_mingw_64_bit-Debug.
    [cmake] -- Could NOT find WrapVulkanHeaders (missing: Vulkan_INCLUDE_DIR) 
    [cmake] -- Could NOT find WrapVulkanHeaders (missing: Vulkan_INCLUDE_DIR) 
    [cmake] 'C:/Projects/Qt' is not recognized as an internal or external command,
    [cmake] operable program or batch file.
    [cmake] CMake Error at C:/Qt/6.8.1/llvm-mingw_64/lib/cmake/Qt6Qml/Qt6QmlMacros.cmake:3926 (message):
    [cmake]   Failed to scan target appuntitled for QML imports: 1
    [cmake] Call Stack (most recent call first):
    [cmake]   C:/Qt/6.8.1/llvm-mingw_64/lib/cmake/Qt6Qml/Qt6QmlMacros.cmake:3968 (_qt_internal_scan_qml_imports)
    [cmake]   C:/Qt/6.8.1/llvm-mingw_64/lib/cmake/Qt6Core/Qt6CoreMacros.cmake:745 (qt6_import_qml_plugins)
    [cmake]   C:/Qt/6.8.1/llvm-mingw_64/lib/cmake/Qt6Core/Qt6CoreMacros.cmake:745 (cmake_language)
    [cmake]   C:/Qt/6.8.1/llvm-mingw_64/lib/cmake/Qt6Core/Qt6CoreMacros.cmake:823 (_qt_internal_finalize_executable)
    [cmake]   C:/Qt/6.8.1/llvm-mingw_64/lib/cmake/Qt6Core/Qt6CoreMacros.cmake:792:EVAL:1 (qt6_finalize_target)
    [cmake]   CMakeLists.txt:DEFERRED
    [cmake] 
    [cmake] 
    [cmake] -- Configuring incomplete, errors occurred!
    

    And this is what I see in the issues window:
    cdf532ed-6143-4263-a7c8-e79354c28fff-image.png

    dheerendraD 1 Reply Last reply
    0
    • pillexyz_zP pillexyz_z

      Hey!

      I'm a fairly beginner using Qt, but I can't even to manage to run a new project without issues.

      When I make a new Qt Quick Application (compat) with qmake it works fine but I can't use Qt 6.5 only 6.2 (or older).
      If I make a Qt Quick Application which only allows me to use cmake it doesn't even start.
      Honestly I have no idea why it's not working, I tried to search for a solution for hours.

      This is what I see in the general messages window:

      [cmake] Running C:\Qt\Tools\CMake_64\bin\cmake.exe -S "C:/Projects/Qt Projects/untitled" -B "C:/Projects/Qt Projects/untitled/build/Desktop_Qt_6_8_1_llvm_mingw_64_bit-Debug" in C:\Projects\Qt Projects\untitled\build\Desktop_Qt_6_8_1_llvm_mingw_64_bit-Debug.
      [cmake] -- Could NOT find WrapVulkanHeaders (missing: Vulkan_INCLUDE_DIR) 
      [cmake] -- Could NOT find WrapVulkanHeaders (missing: Vulkan_INCLUDE_DIR) 
      [cmake] 'C:/Projects/Qt' is not recognized as an internal or external command,
      [cmake] operable program or batch file.
      [cmake] CMake Error at C:/Qt/6.8.1/llvm-mingw_64/lib/cmake/Qt6Qml/Qt6QmlMacros.cmake:3926 (message):
      [cmake]   Failed to scan target appuntitled for QML imports: 1
      [cmake] Call Stack (most recent call first):
      [cmake]   C:/Qt/6.8.1/llvm-mingw_64/lib/cmake/Qt6Qml/Qt6QmlMacros.cmake:3968 (_qt_internal_scan_qml_imports)
      [cmake]   C:/Qt/6.8.1/llvm-mingw_64/lib/cmake/Qt6Core/Qt6CoreMacros.cmake:745 (qt6_import_qml_plugins)
      [cmake]   C:/Qt/6.8.1/llvm-mingw_64/lib/cmake/Qt6Core/Qt6CoreMacros.cmake:745 (cmake_language)
      [cmake]   C:/Qt/6.8.1/llvm-mingw_64/lib/cmake/Qt6Core/Qt6CoreMacros.cmake:823 (_qt_internal_finalize_executable)
      [cmake]   C:/Qt/6.8.1/llvm-mingw_64/lib/cmake/Qt6Core/Qt6CoreMacros.cmake:792:EVAL:1 (qt6_finalize_target)
      [cmake]   CMakeLists.txt:DEFERRED
      [cmake] 
      [cmake] 
      [cmake] -- Configuring incomplete, errors occurred!
      

      And this is what I see in the issues window:
      cdf532ed-6143-4263-a7c8-e79354c28fff-image.png

      dheerendraD Offline
      dheerendraD Offline
      dheerendra
      Qt Champions 2022
      wrote on last edited by
      #2

      It may be an issue with your project directory with with spaces "C:/Projects/Qt Projects/untitled"
      See the space between Qt & Projects. Try with different directory without spaces & see how does it go.

      Dheerendra
      @Community Service
      Certified Qt Specialist
      http://www.pthinks.com

      pillexyz_zP 1 Reply Last reply
      0
      • dheerendraD dheerendra

        It may be an issue with your project directory with with spaces "C:/Projects/Qt Projects/untitled"
        See the space between Qt & Projects. Try with different directory without spaces & see how does it go.

        pillexyz_zP Offline
        pillexyz_zP Offline
        pillexyz_z
        wrote on last edited by
        #3

        @dheerendra Oh god I don't want to believe this worked. I tried multiple locations but apparently every one of them had spaces in them. Thanks for the help!!!!

        1 Reply Last reply
        0
        • dheerendraD Offline
          dheerendraD Offline
          dheerendra
          Qt Champions 2022
          wrote on last edited by
          #4

          @pillexyz_z. Good news. Move the ticket to solved as well.

          Dheerendra
          @Community Service
          Certified Qt Specialist
          http://www.pthinks.com

          1 Reply Last reply
          0
          • pillexyz_zP pillexyz_z has marked this topic as solved on

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved