Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-32767

clean WinOS and Clean Qt Installations with qt6.9.0 and unable to create a Widget Application, always failing

    XMLWordPrintable

Details

    • Bug
    • Resolution: Incomplete
    • Not Evaluated
    • None
    • Qt Creator 16.0.1
    • Windows 11

    Description

      CMakeList.txt:

      cmake_minimum_required(VERSION 3.16)

      project(untitled7 VERSION 0.1 LANGUAGES CXX)

      set(CMAKE_AUTOUIC ON)
      set(CMAKE_AUTOMOC ON)
      set(CMAKE_AUTORCC ON)

      set(CMAKE_CXX_STANDARD 17)
      set(CMAKE_CXX_STANDARD_REQUIRED ON)

      find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Widgets)
      find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Widgets)

      set(PROJECT_SOURCES
              main.cpp
              mainwindow.cpp
              mainwindow.h
              mainwindow.ui
      )

      if(${QT_VERSION_MAJOR} GREATER_EQUAL 6)
          qt_add_executable(untitled7
              MANUAL_FINALIZATION
              ${PROJECT_SOURCES}
          )

      1. Define target properties for Android with Qt 6 as:
      2.    set_property(TARGET untitled7 APPEND PROPERTY QT_ANDROID_PACKAGE_SOURCE_DIR
      3.                 ${CMAKE_CURRENT_SOURCE_DIR}/android)
      4. For more information, see https://doc.qt.io/qt-6/qt-add-executable.html#target-creation
        else()
            if(ANDROID)
                add_library(untitled7 SHARED
                    ${PROJECT_SOURCES}
                )
      5. Define properties for Android with Qt 5 after find_package() calls as:
      6.    set(ANDROID_PACKAGE_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/android")
            else()
                add_executable(untitled7
                    ${PROJECT_SOURCES}
                )
            endif()
        endif()

      target_link_libraries(untitled7 PRIVATE Qt${QT_VERSION_MAJOR}::Widgets)

      1. Qt for iOS sets MACOSX_BUNDLE_GUI_IDENTIFIER automatically since Qt 6.1.
      2. If you are developing for iOS or macOS you should consider setting an
      3. explicit, fixed bundle identifier manually though.
        if(${QT_VERSION} VERSION_LESS 6.1.0)
          set(BUNDLE_ID_OPTION MACOSX_BUNDLE_GUI_IDENTIFIER com.example.untitled7)
        endif()
        set_target_properties(untitled7 PROPERTIES
            ${BUNDLE_ID_OPTION}
            MACOSX_BUNDLE_BUNDLE_VERSION ${PROJECT_VERSION}
            MACOSX_BUNDLE_SHORT_VERSION_STRING ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}
            MACOSX_BUNDLE TRUE
            WIN32_EXECUTABLE TRUE
        )

      include(GNUInstallDirs)
      install(TARGETS untitled7
          BUNDLE DESTINATION .
          LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
          RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
      )

      if(QT_VERSION_MAJOR EQUAL 6)
          qt_finalize_executable(untitled7)
      endif()

      Issue:
      :-1: error: CMake project configuration failed. No CMake configuration for build type "Debug" found. Check General Messages for more information.
      :-1: error: The command "C:\Qt\Tools\CMake_64\bin\cmake.exe -S C:/Qt_Projects/untitled7 -B C:/Qt_Projects/untitled7/build/Desktop_Qt_6_9_0_llvm_mingw_64_bit-Debug "-DCMAKE_COLOR_DIAGNOSTICS:BOOL=ON" "-DCMAKE_C_COMPILER:FILEPATH=C:/Qt/Tools/llvm-mingw1706_64/bin/clang.exe" "-DQT_QMAKE_EXECUTABLE:FILEPATH=C:/Qt/6.9.0/llvm-mingw_64/bin/qmake.exe" "-DCMAKE_PREFIX_PATH:PATH=C:/Qt/6.9.0/llvm-mingw_64" "-DCMAKE_BUILD_TYPE:STRING=Debug" "-DCMAKE_CXX_COMPILER:FILEPATH=C:/Qt/Tools/llvm-mingw1706_64/bin/clang++.exe" "-DCMAKE_GENERATOR:STRING=Ninja" "-DCMAKE_CXX_FLAGS_INIT:STRING=-DQT_QML_DEBUG" "-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=C:\Qt_Projects\untitled7\build\Desktop_Qt_6_9_0_llvm_mingw_64_bit-Debug/.qtc/package-manager/auto-setup.cmake"" terminated with exit code 1.

      General Message:
      [cmake] Running C:\Qt\Tools\CMake_64\bin\cmake.exe -S C:/Qt_Projects/untitled7 -B C:/Qt_Projects/untitled7/build/Desktop_Qt_6_9_0_llvm_mingw_64_bit-Debug "-DCMAKE_COLOR_DIAGNOSTICS:BOOL=ON" "-DCMAKE_C_COMPILER:FILEPATH=C:/Qt/Tools/llvm-mingw1706_64/bin/clang.exe" "-DQT_QMAKE_EXECUTABLE:FILEPATH=C:/Qt/6.9.0/llvm-mingw_64/bin/qmake.exe" "-DCMAKE_PREFIX_PATH:PATH=C:/Qt/6.9.0/llvm-mingw_64" "-DCMAKE_BUILD_TYPE:STRING=Debug" "-DCMAKE_CXX_COMPILER:FILEPATH=C:/Qt/Tools/llvm-mingw1706_64/bin/clang++.exe" "-DCMAKE_GENERATOR:STRING=Ninja" "-DCMAKE_CXX_FLAGS_INIT:STRING=-DQT_QML_DEBUG" "-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=C:\Qt_Projects\untitled7\build\Desktop_Qt_6_9_0_llvm_mingw_64_bit-Debug/.qtc/package-manager/auto-setup.cmake" in C:\Qt_Projects\untitled7\build\Desktop_Qt_6_9_0_llvm_mingw_64_bit-Debug.
      [cmake] – The CXX compiler identification is Clang 17.0.6
      [cmake] – Detecting CXX compiler ABI info
      [cmake] – Detecting CXX compiler ABI info - done
      [cmake] – Check for working CXX compiler: C:/Qt/Tools/llvm-mingw1706_64/bin/clang++.exe - skipped
      [cmake] – Detecting CXX compile features
      [cmake] – Detecting CXX compile features - done
      [cmake] – Performing Test CMAKE_HAVE_LIBC_PTHREAD
      [cmake] – Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
      [cmake] – Check if compiler accepts -pthread
      [cmake] – Check if compiler accepts -pthread - yes
      [cmake] – Found Threads: TRUE
      [cmake] – Performing Test HAVE_STDATOMIC
      [cmake] – Performing Test HAVE_STDATOMIC - Success
      [cmake] – Found WrapAtomic: TRUE
      [cmake] – Could NOT find WrapVulkanHeaders (missing: Vulkan_INCLUDE_DIR) 
      [cmake] – Configuring done (2.9s)
      [cmake] CMake Error: AUTOUIC for target untitled7: Test run of "uic" executable "C:/Qt/6.9.0/llvm-mingw_64/bin/uic.exe" failed.
      [cmake] C:/Qt/6.9.0/llvm-mingw_64/bin/uic.exe -h
      [cmake] 
      [cmake] Exit code 0xc000041d
      [cmake] 
      [cmake] CMake Generate step failed.  Build files cannot be regenerated correctly.
      [cmake] 
      [cmake] The command "C:\Qt\Tools\CMake_64\bin\cmake.exe -S C:/Qt_Projects/untitled7 -B C:/Qt_Projects/untitled7/build/Desktop_Qt_6_9_0_llvm_mingw_64_bit-Debug "-DCMAKE_COLOR_DIAGNOSTICS:BOOL=ON" "-DCMAKE_C_COMPILER:FILEPATH=C:/Qt/Tools/llvm-mingw1706_64/bin/clang.exe" "-DQT_QMAKE_EXECUTABLE:FILEPATH=C:/Qt/6.9.0/llvm-mingw_64/bin/qmake.exe" "-DCMAKE_PREFIX_PATH:PATH=C:/Qt/6.9.0/llvm-mingw_64" "-DCMAKE_BUILD_TYPE:STRING=Debug" "-DCMAKE_CXX_COMPILER:FILEPATH=C:/Qt/Tools/llvm-mingw1706_64/bin/clang++.exe" "-DCMAKE_GENERATOR:STRING=Ninja" "-DCMAKE_CXX_FLAGS_INIT:STRING=-DQT_QML_DEBUG" "-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=C:\Qt_Projects\untitled7\build\Desktop_Qt_6_9_0_llvm_mingw_64_bit-Debug/.qtc/package-manager/auto-setup.cmake"" terminated with exit code 1.
      [cmake] 
      [cmake] Elapsed time: 00:03.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            kandeler Christian Kandeler
            randyxi Charran Sinanan
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes