Creating a new Qt Quick Application with cmake already has errors
-
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:
-
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 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!!!!
-
@pillexyz_z. Good news. Move the ticket to solved as well.
-