building qt from sources - CMake Error at cmake/FindQt5.cmake
-
Hey all, I have encountered the aforementioned error.
with the following being executed :
any hints or clues will be welcomed :)
-
@JonB
QT6, but it seems like it requires QT5 for doing so, therefore the prefix_path to qt5 i guess -
@GALAV
Then (not that I have done this but) presumably you should not have passedC:\Qt5.15.2\...
tocmake
. You should not have/use anything Qt5.x to build Qt6.x. -
First of all it seems like you're not trying to build Qt from sources, but Qt Creator.
Try to change the CMAKE_PREFIX_PATH you set to
C:\Qt\6.3.1\msvc2019_64
(leaving out thelib\cmake\Qt6
part). -
First of all it seems like you're not trying to build Qt from sources, but Qt Creator.
Try to change the CMAKE_PREFIX_PATH you set to
C:\Qt\6.3.1\msvc2019_64
(leaving out thelib\cmake\Qt6
part). -
-
Please delete the
CMakeCache.txt
file, and re-run. It seeems stuff was cached from a previous run. -
Please delete the
CMakeCache.txt
file, and re-run. It seeems stuff was cached from a previous run. -
So master branch ...
I assume you have checked that C:\Qt\6.3.1\msvc2019_64 contains a valid Qt 6 installation?
Can you re-run cmake with --trace argument, log this to a file and upload the dump somewhere to inspect? E.g.
del CMakeCache.txt && cmake --trace -DCMAKE_BUILD_TYPE=Debug -G Ninja -DCMAKE_PREFIX_PATH=C:\Qt\6.3.1\msvc2019_64 C:\Users\Administrator\Desktop\QT-CREATOR-SRC >trace.log 2>&1
-
thanks for providing the command.
it seems i don't have the privileges to attach a log file.
https://ctxt.io/2/AADgjVtcFw -- tracelog
-
CMake thinks the bitness of the Qt version does not match the bitness of the compiler. And indeed, it seems you're trying to build with the x86 compiler, but the Qt version you reference is 64bit.
If you indeed want to build an x86 binary, you most likely have to build Qt yourself. The installer only offers 64 bit binaries by default.
If choosing x86 was an accident, set up the build environment to 64 bit. For instance, launch cmd.exe and run
"C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Auxiliary\Build\vcvarsall.bat" amd64
-
@GalHA , Qt Creator master branch now expects Qt 6.2.
https://lists.qt-project.org/pipermail/qt-creator/2022-July/009050.html
So you need to install Qt 6.2 or newer.
-
@GalHA , Qt Creator master branch now expects Qt 6.2.
https://lists.qt-project.org/pipermail/qt-creator/2022-July/009050.html
So you need to install Qt 6.2 or newer.