Congratulations to our 2022 Qt Champions!

Qt 6 Cmake Error and totally lost on a solution

  • So I have an application I have been working on for a month in Qt 6 compiling with msvc2019 x64. So I had a problem earlier today (can't even remember what it was) so I updated visual studio and everything went crazy. FYI it is a gui application, anyway I finally wound up uninstalling and reinstalling qt. So I now have the latest version of both as of today. So here is the output when I try to build:

    Running C:\Qt\Tools\CMake_64\bin\cmake.exe -S "C:/Users/Stacey Tower/Desktop/DitaTransform/DXT" -B "C:/Users/Stacey Tower/AppData/Local/Temp/QtCreator-ePlksq/qtc-cmake-VRacWRIm" -GNinja "-DCMAKE_BUILD_TYPE:String=Debug" "-DQT_QMAKE_EXECUTABLE:STRING=C:/Qt/6.0.1/msvc2019_64/bin/qmake.exe" "-DCMAKE_PREFIX_PATH:STRING=C:/Qt/6.0.1/msvc2019_64" "-DCMAKE_C_COMPILER:STRING=C:/Qt6/Tools/QtCreator/bin/clang/bin/clang-cl.exe" "-DCMAKE_CXX_COMPILER:STRING=C:/Qt6/Tools/QtCreator/bin/clang/bin/clang-cl.exe" in C:\Users\Stacey Tower\AppData\Local\Temp\QtCreator-ePlksq\qtc-cmake-VRacWRIm.
    -- The CXX compiler identification is unknown
    CMake Error at CMakeLists.txt:3 (project):


    is not a full path to an existing compiler tool.

    Tell CMake where to find the compiler by setting either the environment
    variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
    to the compiler, or to the compiler name if it is in the PATH.

    -- Configuring incomplete, errors occurred!
    See also "C:/Users/Stacey Tower/AppData/Local/Temp/QtCreator-ePlksq/qtc-cmake-VRacWRIm/CMakeFiles/CMakeOutput.log".
    See also "C:/Users/Stacey Tower/AppData/Local/Temp/QtCreator-ePlksq/qtc-cmake-VRacWRIm/CMakeFiles/CMakeError.log".
    CMake process exited with exit code 1.

    You will notice that at the top of the output some of the references are to C:/Qt which is my new install directory and some are still to C:/Qt6 which was the old install directory that I uninstalled before I installed the new version. I have changed every path, gone into the registry and gotten rid of every reference to c:/Qt6 I could find and I have no Idea what to do next. The only way I can get even a blank application to build is to go into the cache file entry in appdata and changing the two references of c:/Qt6 to c:/Qt and it builds once. Anyone Please Help!!!!!

    I can't get a capture of it but in my kit I also have a warning that says Warning! Cmake has a path to a c++ compiler set even though the kit has no valid toolchain.

    Any help would be greatly appreciated...Thanks

  • Lifetime Qt Champion

    @shathcock said in Qt 6 Cmake Error and totally lost on a solution:


    I don't think this is proper compiler. This one is used by QtCreator for code model, not to build projects.
    It looks like you installed Qt for msvc2019_64, so you need Microsoft compiler. Did you install Visual Studio or MS build tools?

  • @jsulm I installed Visual Studio

  • @shathcock Actually I didn't install visual studio just ran the updates for the 2019 version

  • @shathcock That worked !!!! Thank you very very much. I changed the compilers to 14.xxxx x64 and it's working now!

Log in to reply