-
Hi I have the following problem with CMake and QT Creator 4.14.2 and QT 6.1.0
I use the msvc compile and have compiled QT and QT Creator withit.
When i create a new QT Project, i can't compile my project. I received the following errors:
If i run cmake i receive the following output:Führe C:\Program Files\CMake\bin\cmake.exe -S G:/qt_projects/test2 -B G:/qt_projects/build-test2-win-Debug in G:\qt_projects\build-test2-win-Debug aus. -- Configuring done -- Generating done -- Build files have been written to: G:/qt_projects/build-test2-win-Debug Verstrichene Zeit: 00:00. Führe C:\Program Files\CMake\bin\cmake.exe -S G:/qt_projects/test2 -B G:/qt_projects/build-test2-win-Debug "-GNinja Multi-Config" "-DCMAKE_BUILD_TYPE:String=Debug" "-DQT_QMAKE_EXECUTABLE:STRING=G:/Qt/qt-6.1.0-win/bin/qmake.exe" "-DCMAKE_PREFIX_PATH:STRING=G:/Qt/qt-6.1.0-win" "-DCMAKE_C_COMPILER:STRING=C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/BIN/x86_amd64/cl.exe" "-DCMAKE_CXX_COMPILER:STRING=C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/BIN/x86_amd64/cl.exe" in G:\qt_projects\build-test2-win-Debug aus. -- The CXX compiler identification is MSVC 19.0.24245.0 -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/BIN/x86_amd64/cl.exe - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Looking for C++ include pthread.h -- Looking for C++ include pthread.h - not found -- Found Threads: TRUE -- Performing Test HAVE_STDATOMIC -- Performing Test HAVE_STDATOMIC - Success -- Found WrapAtomic: TRUE -- Configuring done -- Generating done CMake Warning: Manually-specified variables were not used by the project: CMAKE_BUILD_TYPE CMAKE_C_COMPILER QT_QMAKE_EXECUTABLE -- Build files have been written to: G:/qt_projects/build-test2-win-Debug Verstrichene Zeit: 00:04.
Have anyone an idea?
Bests
Brian -
@bdahl said in CMake QT Creator Problems:
Have anyone an idea?
You can not compile Qt6 with such an ancient MSVC compiler. Update to MSVC2019 and make sure you install the correct Qt version (MSVC, not MinGW) when you want to use MSVC.
-
@Christian-Ehrlicher I used VS2019 and also compiled QT with this. But i test it with another CL version...
-
@bdahl said in CMake QT Creator Problems:
and also compiled QT with this
You compiled Qt by yourself? So you should know where qmake is and either add the directory to your PATH or point cmake to it (best with cmake-gui). I would prefer the former.