Unable To Build Fresh QT Quick Application
Unsolved
QML and Qt Quick
-
I am trying to learn how to use QT Quick and I created a simple project and just trying to build it straight after creating it and it throws these errors.
and the general logs
As I am able to create a qt widget application and compile it just after it's creation, it does not seem like it would be a cmake problem. I could be wrong though.
-
Hi and welcome to the forum,
Please also don't post pictures of text, just post the text directly, using the </> code formatting tags
Start doing so with yourCMakeLists.txt
. -
Cmake
cmake_minimum_required(VERSION 3.16) project(RemoteDisplay VERSION 0.1 LANGUAGES CXX) set(CMAKE_CXX_STANDARD_REQUIRED ON) find_package(Qt6 6.5 REQUIRED COMPONENTS Quick) qt_standard_project_setup(REQUIRES 6.5) qt_add_executable(appRemoteDisplay main.cpp ) qt_add_qml_module(appRemoteDisplay URI RemoteDisplay VERSION 1.0 QML_FILES Main.qml ) # Qt for iOS sets MACOSX_BUNDLE_GUI_IDENTIFIER automatically since Qt 6.1. # If you are developing for iOS or macOS you should consider setting an # explicit, fixed bundle identifier manually though. set_target_properties(appRemoteDisplay PROPERTIES # MACOSX_BUNDLE_GUI_IDENTIFIER com.example.appRemoteDisplay MACOSX_BUNDLE_BUNDLE_VERSION ${PROJECT_VERSION} MACOSX_BUNDLE_SHORT_VERSION_STRING ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR} MACOSX_BUNDLE TRUE WIN32_EXECUTABLE TRUE ) target_link_libraries(appRemoteDisplay PRIVATE Qt6::Quick ) include(GNUInstallDirs) install(TARGETS appRemoteDisplay BUNDLE DESTINATION . LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} )
-
Looks about right.
What does the compile output say? -
There is no compiled output. There are issues that say
Failed to scan target appDisplay for QML imports; 1
The command "C:\cmake-3.31.0-rc2-windows-x86_64\cmake-3.31.0-rc2-windows-x86_64\bin\cmake.exe -S "C:/Users/cbarb/Documents/QT Projects/Display" -B "C:/Users/cbarb/Documents/QT Projects/Display/build/Desktop_Qt_6_8_0_MinGW_64_bit-Debug" "-DCMAKE_CXX_COMPILER:FILEPATH=C:/Qt/Tools/mingw1310_64/bin/g++.exe" "-DQT_QMAKE_EXECUTABLE:FILEPATH=C:/Qt/6.8.0/mingw_64/bin/qmake.exe" "-DCMAKE_BUILD_TYPE:STRING=Debug" "-DCMAKE_PREFIX_PATH:PATH=C:/Qt/6.8.0/mingw_64" "-DCMAKE_GENERATOR:STRING=MinGW Makefiles" "-DCMAKE_C_COMPILER:FILEPATH=C:/Qt/Tools/mingw1310_64/bin/gcc.exe" "-DCMAKE_CXX_FLAGS_INIT:STRING=-DQT_QML_DEBUG" "-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=C:\Users\cbarb\Documents\QT Projects\Display\build\Desktop_Qt_6_8_0_MinGW_64_bit-Debug/.qtc/package-manager/auto-setup.cmake"" terminated with exit code 1.
CMake project configuration failed. No CMake configuration for build type "Debug" found. Check General Messages for more information.
-
The issues are just a summary of the compile out put. It’s Tab Nr. 4 according to your screen shot.