Failed to open and run an official code example in Qt Creator using Qt 6.7.0 beta1
-
Hello,
I try to open and run the
cube
example. I useQt 6.7.0 beta1
. I see examples in the Welcome page and click on thecube
example. I see that the project files are inactive:I see these errors:
C:\Qt\Examples\Qt-6.7.0\opengl\cube\CMakeLists.txt:13: error: By not providing "FindQt6.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "Qt6", but CMake did not find one. Could not find a package configuration file provided by "Qt6" with any of the following names: Qt6Config.cmake qt6-config.cmake Add the installation prefix of "Qt6" to CMAKE_PREFIX_PATH or set "Qt6_DIR" to a directory containing one of the above files. If "Qt6" provides a separate development package or SDK, be sure it has been installed.
It is interesting for me what is wrong. I see that the example uses CMake. I have CMake installed:
I have a path to CMake in the Path variable: -
@8Observer8
There is something wrong on your system.
I just installed 6.7.0 beta 1 on a fresh virtual machine with windows 11.
The example compiles with MinGW out of the box.My guess is, that your path contains another CMake executable. That is probably why qmake works and CMake doesn´t.
-
@8Observer8
Is it a fresh install from the maintenance tool?
Which compile kit are you using? The one from the installer with 6.7.0 beta1? -
@Axel-Spoerl yes, from the installer:
-
@8Observer8
Weird. Can you compile anything at all? If only the cube example fails, you have to report another bug I'd say.
I don't use Windows, so I can't reproduce. It compiles on Linux. -
@Axel-Spoerl I can compile my own examples with QMake. I tried to open the "Menus Example" but it gives the same result because it uses CMake too. I created a bug report: https://bugreports.qt.io/browse/QTBUG-120952
-
@8Observer8
There is something wrong on your system.
I just installed 6.7.0 beta 1 on a fresh virtual machine with windows 11.
The example compiles with MinGW out of the box.My guess is, that your path contains another CMake executable. That is probably why qmake works and CMake doesn´t.
-
@Axel-Spoerl said in Failed to open and run an official code example in Qt Creator using Qt 6.7.0 beta1:
My guess is, that your path contains another CMake executable
Yes, you are right. I had another CMake installed in "C:\Program Files". I removed it. But Qt wants from me to set up CMake? I don't know how to make it:
But I see that Qt Creator detects CMake:
-
@8Observer8
It's all documented here. -