Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Can't set up CMake. Getting errors.

Can't set up CMake. Getting errors.

Scheduled Pinned Locked Moved Solved General and Desktop
cmakeerrorc++qt designervscode
12 Posts 4 Posters 4.6k 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.
  • J Offline
    J Offline
    jLyurii
    wrote on 21 Aug 2023, 07:56 last edited by
    #1

    At this point, I just don't know what I am doing wrong. I spent the whole night trying to fix different issues, and this is the last one which I don't know how to fix. This is the issue that I don't know how to fix. I created a GUI in Qt Design Studio and then exported it into CMake with all files checked to be rewritten. Version of CMake 3.27.3, and version of Qt 6.5.2(Design Studio 4.2.0).

    [proc] Executing command: cmake --version
    [proc] Executing command: cmake -E capabilities
    [variant] Loaded new set of variants
    [kit] Successfully loaded 5 kits from C:\Users\YuriiButNotYuri\AppData\Local\CMakeTools\cmake-tools-kits.json
    [proc] Executing command: D:\Programming\CMake\bin\cmake.EXE --version
    [proc] Executing command: D:\Programming\CMake\bin\cmake.EXE -E capabilities
    [proc] Executing command: C:\msys64\mingw64\bin\gcc.exe -v
    [proc] Executing command: D:\Programming\CMake\bin\cmake.EXE -SC:/Users/YuriiButNotYuri/Desktop/japanese_app_v2/qt_gui/Japanese_app_v20_gui -Bc:/Users/YuriiButNotYuri/Desktop/japanese_app_v2/build -G "MinGW Makefiles"
    [proc] The command: D:\Programming\CMake\bin\cmake.EXE -SC:/Users/YuriiButNotYuri/Desktop/japanese_app_v2/qt_gui/Japanese_app_v20_gui -Bc:/Users/YuriiButNotYuri/Desktop/japanese_app_v2/build -G "MinGW Makefiles" exited with code: 1
    [main] Configuring project: japanese_app_v2 
    [proc] Executing command: D:\Programming\CMake\bin\cmake.EXE --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Debug -DCMAKE_PREFIX_PATH:STRING=D:/Programming/Qt_Designer/6.5.2/msvc2019_64/lib/cmake -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE -DCMAKE_C_COMPILER:FILEPATH=C:\msys64\mingw64\bin\gcc.exe -DCMAKE_CXX_COMPILER:FILEPATH=C:\msys64\mingw64\bin\g++.exe -SC:/Users/YuriiButNotYuri/Desktop/japanese_app_v2/qt_gui/Japanese_app_v20_gui -Bc:/Users/YuriiButNotYuri/Desktop/japanese_app_v2/build -G "MinGW Makefiles"
    [cmake] Not searching for unused variables given on the command line.
    [cmake] -- Could NOT find WrapVulkanHeaders (missing: Vulkan_INCLUDE_DIR) 
    [cmake] CMake Error at D:/Programming/Qt_Designer/Tools/QtDesignStudio/qt6_design_studio_reduced_version/lib/cmake/Qt6EntryPointPrivate/Qt6EntryPointPrivateTargets.cmake:99 (message):
    [cmake]   The imported target "Qt6::EntryPointImplementation" references the file
    [cmake] 
    [cmake]      "D:/Programming/Qt_Designer/Tools/QtDesignStudio/qt6_design_studio_reduced_version/lib/Qt6EntryPointd.lib"
    [cmake] 
    [cmake]   but this file does not exist.  Possible reasons include:
    [cmake] 
    [cmake]   * The file was deleted, renamed, or moved to another location.
    [cmake] 
    [cmake]   * An install or uninstall procedure did not complete successfully.
    [cmake] 
    [cmake]   * The installation package was faulty and contained
    [cmake] 
    [cmake]      "D:/Programming/Qt_Designer/Tools/QtDesignStudio/qt6_design_studio_reduced_version/lib/cmake/Qt6EntryPointPrivate/Qt6EntryPointPrivateTargets.cmake"
    [cmake] 
    [cmake]   but not all the files it references.
    [cmake] 
    [cmake] Call Stack (most recent call first):
    [cmake]   D:/Programming/Qt_Designer/Tools/QtDesignStudio/qt6_design_studio_reduced_version/lib/cmake/Qt6EntryPointPrivate/Qt6EntryPointPrivateConfig.cmake:52 (include)
    [cmake]   D:/Programming/CMake/share/cmake-3.27/Modules/CMakeFindDependencyMacro.cmake:76 (find_package)
    [cmake]   D:/Programming/Qt_Designer/6.5.2/msvc2019_64/lib/cmake/Qt6/QtPublicDependencyHelpers.cmake:111 (find_dependency)
    [cmake]   D:/Programming/Qt_Designer/Tools/QtDesignStudio/qt6_design_studio_reduced_version/lib/cmake/Qt6Core/Qt6CoreDependencies.cmake:39 (_qt_internal_find_qt_dependencies)
    [cmake]   D:/Programming/Qt_Designer/Tools/QtDesignStudio/qt6_design_studio_reduced_version/lib/cmake/Qt6Core/Qt6CoreConfig.cmake:40 (include)
    [cmake]   D:/Programming/CMake/share/cmake-3.27/Modules/CMakeFindDependencyMacro.cmake:76 (find_package)
    [cmake]   D:/Programming/Qt_Designer/6.5.2/msvc2019_64/lib/cmake/Qt6/QtPublicDependencyHelpers.cmake:111 (find_dependency)
    [cmake]   D:/Programming/Qt_Designer/Tools/QtDesignStudio/qt6_design_studio_reduced_version/lib/cmake/Qt6Gui/Qt6GuiDependencies.cmake:39 (_qt_internal_find_qt_dependencies)
    [cmake]   D:/Programming/Qt_Designer/Tools/QtDesignStudio/qt6_design_studio_reduced_version/lib/cmake/Qt6Gui/Qt6GuiConfig.cmake:40 (include)
    [cmake]   D:/Programming/Qt_Designer/6.5.2/msvc2019_64/lib/cmake/Qt6/Qt6Config.cmake:157 (find_package)
    [cmake]   CMakeLists.txt:8 (find_package)
    [cmake] 
    [cmake] 
    [cmake] -- Configuring incomplete, errors occurred!
    [cmake] CMake Warning at D:/Programming/CMake/share/cmake-3.27/Modules/CMakeFindDependencyMacro.cmake:76 (find_package):
    [cmake]   Found package configuration file:
    [cmake] 
    [cmake]     D:/Programming/Qt_Designer/Tools/QtDesignStudio/qt6_design_studio_reduced_version/lib/cmake/Qt6Core/Qt6CoreConfig.cmake
    [cmake] 
    [cmake]   but it set Qt6Core_FOUND to FALSE so package "Qt6Core" is considered to be
    [cmake]   NOT FOUND.
    [cmake] Call Stack (most recent call first):
    [cmake]   D:/Programming/Qt_Designer/6.5.2/msvc2019_64/lib/cmake/Qt6/QtPublicDependencyHelpers.cmake:111 (find_dependency)
    [cmake]   D:/Programming/Qt_Designer/Tools/QtDesignStudio/qt6_design_studio_reduced_version/lib/cmake/Qt6Gui/Qt6GuiDependencies.cmake:39 (_qt_internal_find_qt_dependencies)
    [cmake]   D:/Programming/Qt_Designer/Tools/QtDesignStudio/qt6_design_studio_reduced_version/lib/cmake/Qt6Gui/Qt6GuiConfig.cmake:40 (include)
    [cmake]   D:/Programming/Qt_Designer/6.5.2/msvc2019_64/lib/cmake/Qt6/Qt6Config.cmake:157 (find_package)
    [cmake]   CMakeLists.txt:8 (find_package)
    [cmake] 
    [cmake] 
    [cmake] CMake Warning at D:/Programming/Qt_Designer/6.5.2/msvc2019_64/lib/cmake/Qt6/Qt6Config.cmake:157 (find_package):
    [cmake]   Found package configuration file:
    [cmake] 
    [cmake]     D:/Programming/Qt_Designer/Tools/QtDesignStudio/qt6_design_studio_reduced_version/lib/cmake/Qt6Gui/Qt6GuiConfig.cmake
    [cmake] 
    [cmake]   but it set Qt6Gui_FOUND to FALSE so package "Qt6Gui" is considered to be
    [cmake]   NOT FOUND.
    [cmake] Call Stack (most recent call first):
    [cmake]   CMakeLists.txt:8 (find_package)
    [cmake] 
    [cmake] 
    [proc] The command: D:\Programming\CMake\bin\cmake.EXE --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Debug -DCMAKE_PREFIX_PATH:STRING=D:/Programming/Qt_Designer/6.5.2/msvc2019_64/lib/cmake -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE -DCMAKE_C_COMPILER:FILEPATH=C:\msys64\mingw64\bin\gcc.exe -DCMAKE_CXX_COMPILER:FILEPATH=C:\msys64\mingw64\bin\g++.exe -SC:/Users/YuriiButNotYuri/Desktop/japanese_app_v2/qt_gui/Japanese_app_v20_gui -Bc:/Users/YuriiButNotYuri/Desktop/japanese_app_v2/build -G "MinGW Makefiles" exited with code: 1
    

    Qt6EntryPointd.lib, Qt6Gui and Qt6Core are somewhere in the Qt folder; I know that they exist.

    I've set CMAKE_PREFIX_PATH in settings.json of VSCode as

    "CMAKE_PREFIX_PATH": "D:/Programming/Qt_Designer/6.5.2/msvc2019_64/lib/cmake"
    

    Path is correct. Also, I have already reinstalled the entire Qt. image

    This is what my CMakeLists.txt looks like

    cmake_minimum_required(VERSION 3.18)
    
    project(Japanese_app_v20_guiApp LANGUAGES CXX)
    
    set(CMAKE_INCLUDE_CURRENT_DIR ON)
    set(CMAKE_AUTOMOC ON)
    
    find_package(Qt6 COMPONENTS Gui Qml Quick)
    qt_add_executable(Japanese_app_v20_guiApp src/main.cpp)
    
    qt_add_resources(Japanese_app_v20_guiApp "configuration"
        PREFIX "/"
        FILES
            qtquickcontrols2.conf
    )
    
    target_link_libraries(Japanese_app_v20_guiApp PRIVATE
        Qt${QT_VERSION_MAJOR}::Core
        Qt${QT_VERSION_MAJOR}::Gui
        Qt${QT_VERSION_MAJOR}::Quick
        Qt${QT_VERSION_MAJOR}::Qml
    )
    
    include(${CMAKE_CURRENT_SOURCE_DIR}/qmlmodules)
    
    
    

    In my main.cpp, I have this error.
    alt text

    I have added the path to the headers, but it still doesn't work. And
    I have tried two variants, but they didn't help.
    alt text
    alt text

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 21 Aug 2023, 17:41 last edited by
      #2

      Hi and welcome to devnet,

      AFAIK, you should install a full version of Qt in order to build your application.

      Just in case, the online installer also provides tools like cmake and Ninja to ensure that you have versions that have been tested and validated to work with Qt.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      J 1 Reply Last reply 21 Aug 2023, 19:15
      0
      • S SGaist
        21 Aug 2023, 17:41

        Hi and welcome to devnet,

        AFAIK, you should install a full version of Qt in order to build your application.

        Just in case, the online installer also provides tools like cmake and Ninja to ensure that you have versions that have been tested and validated to work with Qt.

        J Offline
        J Offline
        jLyurii
        wrote on 21 Aug 2023, 19:15 last edited by
        #3

        @SGaist Yeah, I have already installed it, but it doesn't help. This screenshot is from the MaintenanceTool

        S 1 Reply Last reply 21 Aug 2023, 20:14
        0
        • J jLyurii
          21 Aug 2023, 19:15

          @SGaist Yeah, I have already installed it, but it doesn't help. This screenshot is from the MaintenanceTool

          S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 21 Aug 2023, 20:14 last edited by
          #4

          Did you open your project in Qt Creator using the Kit from the 6.5.2 variant you choose ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          J 1 Reply Last reply 21 Aug 2023, 20:17
          0
          • S SGaist
            21 Aug 2023, 20:14

            Did you open your project in Qt Creator using the Kit from the 6.5.2 variant you choose ?

            J Offline
            J Offline
            jLyurii
            wrote on 21 Aug 2023, 20:17 last edited by jLyurii
            #5

            @SGaist I only used Qt Design Studio. I wanted to create the GUI there and then edit its functionality in VSCode.
            upd: But there is an option in Qt Design Studio to choose a kit down below. I didn't change it after I launched the studio. alt text

            C 1 Reply Last reply 21 Aug 2023, 21:26
            0
            • J jLyurii
              21 Aug 2023, 20:17

              @SGaist I only used Qt Design Studio. I wanted to create the GUI there and then edit its functionality in VSCode.
              upd: But there is an option in Qt Design Studio to choose a kit down below. I didn't change it after I launched the studio. alt text

              C Online
              C Online
              cristian-adam
              wrote on 21 Aug 2023, 21:26 last edited by
              #6
              "CMAKE_PREFIX_PATH": "D:/Programming/Qt_Designer/6.5.2/msvc2019_64/lib/cmake"
              

              is wrong. You only need:

              "CMAKE_PREFIX_PATH": "D:/Programming/Qt_Designer/6.5.2/msvc2019_64"
              

              Being a prefix CMake will automatically try out appending the suffix lib/cmake by itself ...

              It's a classic error with no easy fix, but teaching people what not to do ...

              J 2 Replies Last reply 21 Aug 2023, 22:16
              0
              • C cristian-adam
                21 Aug 2023, 21:26
                "CMAKE_PREFIX_PATH": "D:/Programming/Qt_Designer/6.5.2/msvc2019_64/lib/cmake"
                

                is wrong. You only need:

                "CMAKE_PREFIX_PATH": "D:/Programming/Qt_Designer/6.5.2/msvc2019_64"
                

                Being a prefix CMake will automatically try out appending the suffix lib/cmake by itself ...

                It's a classic error with no easy fix, but teaching people what not to do ...

                J Offline
                J Offline
                jLyurii
                wrote on 21 Aug 2023, 22:16 last edited by
                #7

                @cristian-adam I just tried it, but I encountered the same issue.

                [main] Configuring project: japanese_app_v2 
                [proc] Executing command: D:\Programming\CMake\bin\cmake.EXE --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Debug -DCMAKE_PREFIX_PATH:STRING=D:/Programming/Qt_Designer/6.5.2/msvc2019_64 -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE -DCMAKE_C_COMPILER:FILEPATH=C:\msys64\mingw64\bin\gcc.exe -DCMAKE_CXX_COMPILER:FILEPATH=C:\msys64\mingw64\bin\g++.exe -SC:/Users/YuriiButNotYuri/Desktop/japanese_app_v2/qt_gui/Japanese_app_v20_gui -Bc:/Users/YuriiButNotYuri/Desktop/japanese_app_v2/build -G "MinGW Makefiles"
                [cmake] Not searching for unused variables given on the command line.
                [cmake] -- Could NOT find WrapVulkanHeaders (missing: Vulkan_INCLUDE_DIR) 
                [cmake] CMake Error at D:/Programming/Qt_Designer/Tools/QtDesignStudio/qt6_design_studio_reduced_version/lib/cmake/Qt6EntryPointPrivate/Qt6EntryPointPrivateTargets.cmake:99 (message):
                [cmake]   The imported target "Qt6::EntryPointImplementation" references the file
                [cmake] 
                [cmake]      "D:/Programming/Qt_Designer/Tools/QtDesignStudio/qt6_design_studio_reduced_version/lib/Qt6EntryPointd.lib"
                [cmake] 
                [cmake]   but this file does not exist.  Possible reasons include:
                [cmake] 
                [cmake]   * The file was deleted, renamed, or moved to another location.
                [cmake] 
                [cmake]   * An install or uninstall procedure did not complete successfully.
                [cmake] 
                [cmake]   * The installation package was faulty and contained
                [cmake] 
                [cmake]      "D:/Programming/Qt_Designer/Tools/QtDesignStudio/qt6_design_studio_reduced_version/lib/cmake/Qt6EntryPointPrivate/Qt6EntryPointPrivateTargets.cmake"
                [cmake] 
                [cmake]   but not all the files it references.
                [cmake] 
                [cmake] Call Stack (most recent call first):
                [cmake]   D:/Programming/Qt_Designer/Tools/QtDesignStudio/qt6_design_studio_reduced_version/lib/cmake/Qt6EntryPointPrivate/Qt6EntryPointPrivateConfig.cmake:52 (include)
                [cmake]   D:/Programming/CMake/share/cmake-3.27/Modules/CMakeFindDependencyMacro.cmake:76 (find_package)
                [cmake]   D:/Programming/Qt_Designer/6.5.2/msvc2019_64/lib/cmake/Qt6/QtPublicDependencyHelpers.cmake:111 (find_dependency)
                [cmake]   D:/Programming/Qt_Designer/Tools/QtDesignStudio/qt6_design_studio_reduced_version/lib/cmake/Qt6Core/Qt6CoreDependencies.cmake:39 (_qt_internal_find_qt_dependencies)
                [cmake]   D:/Programming/Qt_Designer/Tools/QtDesignStudio/qt6_design_studio_reduced_version/lib/cmake/Qt6Core/Qt6CoreConfig.cmake:40 (include)
                [cmake]   D:/Programming/CMake/share/cmake-3.27/Modules/CMakeFindDependencyMacro.cmake:76 (find_package)
                [cmake]   D:/Programming/Qt_Designer/6.5.2/msvc2019_64/lib/cmake/Qt6/QtPublicDependencyHelpers.cmake:111 (find_dependency)
                [cmake]   D:/Programming/Qt_Designer/Tools/QtDesignStudio/qt6_design_studio_reduced_version/lib/cmake/Qt6Gui/Qt6GuiDependencies.cmake:39 (_qt_internal_find_qt_dependencies)
                [cmake]   D:/Programming/Qt_Designer/Tools/QtDesignStudio/qt6_design_studio_reduced_version/lib/cmake/Qt6Gui/Qt6GuiConfig.cmake:40 (include)
                [cmake]   D:/Programming/Qt_Designer/6.5.2/msvc2019_64/lib/cmake/Qt6/Qt6Config.cmake:157 (find_package)
                [cmake]   CMakeLists.txt:8 (find_package)
                [cmake] -- Configuring incomplete, errors occurred!
                [cmake] 
                [cmake] 
                [cmake] CMake Warning at D:/Programming/CMake/share/cmake-3.27/Modules/CMakeFindDependencyMacro.cmake:76 (find_package):
                [cmake]   Found package configuration file:
                [cmake] 
                [cmake]     D:/Programming/Qt_Designer/Tools/QtDesignStudio/qt6_design_studio_reduced_version/lib/cmake/Qt6Core/Qt6CoreConfig.cmake
                [cmake] 
                [cmake]   but it set Qt6Core_FOUND to FALSE so package "Qt6Core" is considered to be
                [cmake]   NOT FOUND.
                [cmake] Call Stack (most recent call first):
                [cmake]   D:/Programming/Qt_Designer/6.5.2/msvc2019_64/lib/cmake/Qt6/QtPublicDependencyHelpers.cmake:111 (find_dependency)
                [cmake]   D:/Programming/Qt_Designer/Tools/QtDesignStudio/qt6_design_studio_reduced_version/lib/cmake/Qt6Gui/Qt6GuiDependencies.cmake:39 (_qt_internal_find_qt_dependencies)
                [cmake]   D:/Programming/Qt_Designer/Tools/QtDesignStudio/qt6_design_studio_reduced_version/lib/cmake/Qt6Gui/Qt6GuiConfig.cmake:40 (include)
                [cmake]   D:/Programming/Qt_Designer/6.5.2/msvc2019_64/lib/cmake/Qt6/Qt6Config.cmake:157 (find_package)
                [cmake]   CMakeLists.txt:8 (find_package)
                [cmake] 
                [cmake] 
                [cmake] CMake Warning at D:/Programming/Qt_Designer/6.5.2/msvc2019_64/lib/cmake/Qt6/Qt6Config.cmake:157 (find_package):
                [cmake]   Found package configuration file:
                [cmake] 
                [cmake]     D:/Programming/Qt_Designer/Tools/QtDesignStudio/qt6_design_studio_reduced_version/lib/cmake/Qt6Gui/Qt6GuiConfig.cmake
                [cmake] 
                [cmake]   but it set Qt6Gui_FOUND to FALSE so package "Qt6Gui" is considered to be
                [cmake]   NOT FOUND.
                [cmake] Call Stack (most recent call first):
                [cmake]   CMakeLists.txt:8 (find_package)
                [cmake] 
                [cmake] 
                [proc] The command: D:\Programming\CMake\bin\cmake.EXE --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Debug -DCMAKE_PREFIX_PATH:STRING=D:/Programming/Qt_Designer/6.5.2/msvc2019_64 -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE -DCMAKE_C_COMPILER:FILEPATH=C:\msys64\mingw64\bin\gcc.exe -DCMAKE_CXX_COMPILER:FILEPATH=C:\msys64\mingw64\bin\g++.exe -SC:/Users/YuriiButNotYuri/Desktop/japanese_app_v2/qt_gui/Japanese_app_v20_gui -Bc:/Users/YuriiButNotYuri/Desktop/japanese_app_v2/build -G "MinGW Makefiles" exited with code: 1
                
                
                1 Reply Last reply
                0
                • C cristian-adam
                  21 Aug 2023, 21:26
                  "CMAKE_PREFIX_PATH": "D:/Programming/Qt_Designer/6.5.2/msvc2019_64/lib/cmake"
                  

                  is wrong. You only need:

                  "CMAKE_PREFIX_PATH": "D:/Programming/Qt_Designer/6.5.2/msvc2019_64"
                  

                  Being a prefix CMake will automatically try out appending the suffix lib/cmake by itself ...

                  It's a classic error with no easy fix, but teaching people what not to do ...

                  J Offline
                  J Offline
                  jLyurii
                  wrote on 22 Aug 2023, 05:42 last edited by
                  #8

                  After I reinstalled Qt in a different directory and added set(CMAKE_PREFIX_PATH "D:/Qt/6.5.1/msvc2019_64") to the CMakeLists.txt file, it started compiling. Output:

                  [main] Configuring project: japanese_app_v2 
                  [proc] Executing command: D:\Programming\CMake\bin\cmake.EXE --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Debug -DCMAKE_PREFIX_PATH:STRING=D:/Programming/Qt_Designer/6.5.1/msvc2019_64 -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE -DCMAKE_C_COMPILER:FILEPATH=C:\msys64\mingw64\bin\gcc.exe -DCMAKE_CXX_COMPILER:FILEPATH=C:\msys64\mingw64\bin\g++.exe -SC:/Users/YuriiButNotYuri/Desktop/japanese_app_v2/qt_gui/Japanese_app_v20_gui -Bc:/Users/YuriiButNotYuri/Desktop/japanese_app_v2/build -G "MinGW Makefiles"
                  [cmake] Not searching for unused variables given on the command line.
                  [cmake] -- Could NOT find WrapVulkanHeaders (missing: Vulkan_INCLUDE_DIR) 
                  [cmake] -- Could NOT find WrapVulkanHeaders (missing: Vulkan_INCLUDE_DIR) 
                  [cmake] CMake Warning (dev) at D:/Qt/6.5.1/msvc2019_64/lib/cmake/Qt6Core/Qt6CoreMacros.cmake:2690 (message):
                  [cmake]   Qt policy QTP0001 is not set: ':/qt/qml/' is the default resource prefix
                  [cmake]   for QML modules.  Check https://doc.qt.io/qt-6/qt-cmake-policy-qtp0001.html
                  [cmake]   for policy details.  Use the qt_policy command to set the policy and
                  [cmake]   suppress this warning.
                  [cmake] 
                  [cmake] Call Stack (most recent call first):
                  [cmake]   D:/Qt/6.5.1/msvc2019_64/lib/cmake/Qt6Qml/Qt6QmlMacros.cmake:445 (__qt_internal_setup_policy)
                  [cmake]   qmlmodules:4 (qt6_add_qml_module)
                  [cmake]   CMakeLists.txt:26 (include)
                  [cmake] This warning is for project developers.  Use -Wno-dev to suppress it.
                  [cmake] 
                  [cmake] CMake Warning (dev) at D:/Qt/6.5.1/msvc2019_64/lib/cmake/Qt6Core/Qt6CoreMacros.cmake:2690 (message):
                  [cmake]   Qt policy QTP0001 is not set: ':/qt/qml/' is the default resource prefix
                  [cmake]   for QML modules.  Check https://doc.qt.io/qt-6/qt-cmake-policy-qtp0001.html
                  [cmake]   for policy details.  Use the qt_policy command to set the policy and
                  [cmake]   suppress this warning.
                  [cmake] 
                  [cmake] Call Stack (most recent call first):
                  [cmake]   D:/Qt/6.5.1/msvc2019_64/lib/cmake/Qt6Qml/Qt6QmlMacros.cmake:445 (__qt_internal_setup_policy)
                  [cmake]   content/CMakeLists.txt:7 (qt6_add_qml_module)
                  [cmake] This warning is for project developers.  Use -Wno-dev to suppress it.
                  [cmake] 
                  [cmake] CMake Warning (dev) at D:/Qt/6.5.1/msvc2019_64/lib/cmake/Qt6Core/Qt6CoreMacros.cmake:2690 (message):
                  [cmake]   Qt policy QTP0001 is not set: ':/qt/qml/' is the default resource prefix
                  [cmake]   for QML modules.  Check https://doc.qt.io/qt-6/qt-cmake-policy-qtp0001.html
                  [cmake]   for policy details.  Use the qt_policy command to set the policy and
                  [cmake]   suppress this warning.
                  [cmake] 
                  [cmake] Call Stack (most recent call first):
                  [cmake]   D:/Qt/6.5.1/msvc2019_64/lib/cmake/Qt6Qml/Qt6QmlMacros.cmake:445 (__qt_internal_setup_policy)
                  [cmake]   imports/Japanese_app_v20_gui/CMakeLists.txt:12 (qt6_add_qml_module)
                  [cmake] This warning is for project developers.  Use -Wno-dev to suppress it.
                  [cmake] 
                  [cmake] -- Configuring done (0.7s)
                  [cmake] -- Generating done (0.5s)
                  [cmake] -- Build files have been written to: C:/Users/YuriiButNotYuri/Desktop/japanese_app_v2/build
                  
                  

                  However, I encountered another issue when trying to compile main.cpp alt text

                  jsulmJ 1 Reply Last reply 22 Aug 2023, 05:57
                  0
                  • J jLyurii
                    22 Aug 2023, 05:42

                    After I reinstalled Qt in a different directory and added set(CMAKE_PREFIX_PATH "D:/Qt/6.5.1/msvc2019_64") to the CMakeLists.txt file, it started compiling. Output:

                    [main] Configuring project: japanese_app_v2 
                    [proc] Executing command: D:\Programming\CMake\bin\cmake.EXE --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Debug -DCMAKE_PREFIX_PATH:STRING=D:/Programming/Qt_Designer/6.5.1/msvc2019_64 -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE -DCMAKE_C_COMPILER:FILEPATH=C:\msys64\mingw64\bin\gcc.exe -DCMAKE_CXX_COMPILER:FILEPATH=C:\msys64\mingw64\bin\g++.exe -SC:/Users/YuriiButNotYuri/Desktop/japanese_app_v2/qt_gui/Japanese_app_v20_gui -Bc:/Users/YuriiButNotYuri/Desktop/japanese_app_v2/build -G "MinGW Makefiles"
                    [cmake] Not searching for unused variables given on the command line.
                    [cmake] -- Could NOT find WrapVulkanHeaders (missing: Vulkan_INCLUDE_DIR) 
                    [cmake] -- Could NOT find WrapVulkanHeaders (missing: Vulkan_INCLUDE_DIR) 
                    [cmake] CMake Warning (dev) at D:/Qt/6.5.1/msvc2019_64/lib/cmake/Qt6Core/Qt6CoreMacros.cmake:2690 (message):
                    [cmake]   Qt policy QTP0001 is not set: ':/qt/qml/' is the default resource prefix
                    [cmake]   for QML modules.  Check https://doc.qt.io/qt-6/qt-cmake-policy-qtp0001.html
                    [cmake]   for policy details.  Use the qt_policy command to set the policy and
                    [cmake]   suppress this warning.
                    [cmake] 
                    [cmake] Call Stack (most recent call first):
                    [cmake]   D:/Qt/6.5.1/msvc2019_64/lib/cmake/Qt6Qml/Qt6QmlMacros.cmake:445 (__qt_internal_setup_policy)
                    [cmake]   qmlmodules:4 (qt6_add_qml_module)
                    [cmake]   CMakeLists.txt:26 (include)
                    [cmake] This warning is for project developers.  Use -Wno-dev to suppress it.
                    [cmake] 
                    [cmake] CMake Warning (dev) at D:/Qt/6.5.1/msvc2019_64/lib/cmake/Qt6Core/Qt6CoreMacros.cmake:2690 (message):
                    [cmake]   Qt policy QTP0001 is not set: ':/qt/qml/' is the default resource prefix
                    [cmake]   for QML modules.  Check https://doc.qt.io/qt-6/qt-cmake-policy-qtp0001.html
                    [cmake]   for policy details.  Use the qt_policy command to set the policy and
                    [cmake]   suppress this warning.
                    [cmake] 
                    [cmake] Call Stack (most recent call first):
                    [cmake]   D:/Qt/6.5.1/msvc2019_64/lib/cmake/Qt6Qml/Qt6QmlMacros.cmake:445 (__qt_internal_setup_policy)
                    [cmake]   content/CMakeLists.txt:7 (qt6_add_qml_module)
                    [cmake] This warning is for project developers.  Use -Wno-dev to suppress it.
                    [cmake] 
                    [cmake] CMake Warning (dev) at D:/Qt/6.5.1/msvc2019_64/lib/cmake/Qt6Core/Qt6CoreMacros.cmake:2690 (message):
                    [cmake]   Qt policy QTP0001 is not set: ':/qt/qml/' is the default resource prefix
                    [cmake]   for QML modules.  Check https://doc.qt.io/qt-6/qt-cmake-policy-qtp0001.html
                    [cmake]   for policy details.  Use the qt_policy command to set the policy and
                    [cmake]   suppress this warning.
                    [cmake] 
                    [cmake] Call Stack (most recent call first):
                    [cmake]   D:/Qt/6.5.1/msvc2019_64/lib/cmake/Qt6Qml/Qt6QmlMacros.cmake:445 (__qt_internal_setup_policy)
                    [cmake]   imports/Japanese_app_v20_gui/CMakeLists.txt:12 (qt6_add_qml_module)
                    [cmake] This warning is for project developers.  Use -Wno-dev to suppress it.
                    [cmake] 
                    [cmake] -- Configuring done (0.7s)
                    [cmake] -- Generating done (0.5s)
                    [cmake] -- Build files have been written to: C:/Users/YuriiButNotYuri/Desktop/japanese_app_v2/build
                    
                    

                    However, I encountered another issue when trying to compile main.cpp alt text

                    jsulmJ Offline
                    jsulmJ Offline
                    jsulm
                    Lifetime Qt Champion
                    wrote on 22 Aug 2023, 05:57 last edited by jsulm
                    #9

                    @jLyurii Is it really a compiler error or just what the editor is showing? Code model in QtCreator can show errors even if the application is building.

                    https://forum.qt.io/topic/113070/qt-code-of-conduct

                    J 1 Reply Last reply 22 Aug 2023, 06:00
                    0
                    • jsulmJ jsulm
                      22 Aug 2023, 05:57

                      @jLyurii Is it really a compiler error or just what the editor is showing? Code model in QtCreator can show errors even if the application is building.

                      J Offline
                      J Offline
                      jLyurii
                      wrote on 22 Aug 2023, 06:00 last edited by
                      #10

                      @jsulm this is what Qt Creator shows

                      07:59:42: Starting C:\Users\YuriiButNotYuri\Desktop\japanese_app_v2\qt_gui\build-Japanese_app_v20_gui-Desktop_Qt_6_5_1_MSVC2019_64bit-Debug\Japanese_app_v20_guiApp.exe...
                      QML debugging is enabled. Only use this in a safe environment.
                      QQmlApplicationEngine failed to load component
                      qrc:Main/main.qml:4:1: Type App unavailable
                      qrc:/content/App.qml:14:5: Type Screen01 unavailable
                      qrc:/content/Screen01.ui.qml: Type Constants unavailable
                      qrc:/Japanese_app_v20_gui/Constants.qml:3:1: module "QtQuick.Studio.Application" is not installed
                      07:59:43: C:\Users\YuriiButNotYuri\Desktop\japanese_app_v2\qt_gui\build-Japanese_app_v20_gui-Desktop_Qt_6_5_1_MSVC2019_64bit-Debug\Japanese_app_v20_guiApp.exe exited with code -1
                      
                      jsulmJ 1 Reply Last reply 22 Aug 2023, 06:02
                      0
                      • J jLyurii
                        22 Aug 2023, 06:00

                        @jsulm this is what Qt Creator shows

                        07:59:42: Starting C:\Users\YuriiButNotYuri\Desktop\japanese_app_v2\qt_gui\build-Japanese_app_v20_gui-Desktop_Qt_6_5_1_MSVC2019_64bit-Debug\Japanese_app_v20_guiApp.exe...
                        QML debugging is enabled. Only use this in a safe environment.
                        QQmlApplicationEngine failed to load component
                        qrc:Main/main.qml:4:1: Type App unavailable
                        qrc:/content/App.qml:14:5: Type Screen01 unavailable
                        qrc:/content/Screen01.ui.qml: Type Constants unavailable
                        qrc:/Japanese_app_v20_gui/Constants.qml:3:1: module "QtQuick.Studio.Application" is not installed
                        07:59:43: C:\Users\YuriiButNotYuri\Desktop\japanese_app_v2\qt_gui\build-Japanese_app_v20_gui-Desktop_Qt_6_5_1_MSVC2019_64bit-Debug\Japanese_app_v20_guiApp.exe exited with code -1
                        
                        jsulmJ Offline
                        jsulmJ Offline
                        jsulm
                        Lifetime Qt Champion
                        wrote on 22 Aug 2023, 06:02 last edited by
                        #11

                        @jLyurii So, the application was built but it fails because some Qml types are not available. But I'm not a Qml expert.

                        https://forum.qt.io/topic/113070/qt-code-of-conduct

                        J 1 Reply Last reply 22 Aug 2023, 06:27
                        0
                        • jsulmJ jsulm
                          22 Aug 2023, 06:02

                          @jLyurii So, the application was built but it fails because some Qml types are not available. But I'm not a Qml expert.

                          J Offline
                          J Offline
                          jLyurii
                          wrote on 22 Aug 2023, 06:27 last edited by
                          #12

                          @jsulm I used to believe that the only way to create a C++ GUI was through Qt Design Studio, as I had never created anything in C++ other than console programs. I've created a GUI in Python in the past with it. However, I stumbled upon examples in Qt Creator that use .ui files. I'm familiar with this approach, having worked with UI and widgets before. I believe I'll continue using widgets since they don't show any errors when the program is executed.
                          I will close this conversation as I no longer require assistance with qml. If I encounter any further issues, I'll post on a forum if I'm unable to resolve them myself. Thank you to everyone who tried to help me.

                          1 Reply Last reply
                          1
                          • J jLyurii has marked this topic as solved on 22 Aug 2023, 06:27

                          3/12

                          21 Aug 2023, 19:15

                          topic:navigator.unread, 9
                          • Login

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