Qt Creator/CMake support for MSVC broken in 4.9.0



  • Since Qt Creator 4.9.0 has come out, neither I nor my colleagues can build a CMake project using Visual C++ from within Qt Creator any more.

    On three different computers we've tried four different versions of Visual Studio (2013/15/17/19) and two different versions of CMake (3.13.4 and 3.14.0). In each case:

    • CMake works perfectly well from the command line, with either gcc or MSVC.

    • If CMake is used to generate a Visual Studio project from the command line, then the resulting project works perfectly.

    • If the CMakeLists.txt file is opened by Qt Creator and used as a 'project file' to build with gcc, then everything works perfectly.

    • If we attempt to switch the kit to MSVC - as used to work perfectly up to and including Qt Creator 4.8.2 - it always fails. A typical example of the error messages given is:

    Starting to parse CMake project, using: "-DCMAKE_CXX_COMPILER:STRING=C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/BIN/amd64/cl.exe", "-DCMAKE_C_COMPILER:STRING=C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/BIN/amd64/cl.exe", "-DCMAKE_PREFIX_PATH:STRING=C:/Qt/5.12.2/msvc2015_64", "-DQT_QMAKE_EXECUTABLE:STRING=C:/Qt/5.12.2/msvc2015_64/bin/qmake.exe".
    The CXX compiler identification is MSVC 19.0.24215.1
    Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/BIN/amd64/cl.exe
    CMake Error: Generator: execution of make failed. Make command was: "jom" "/nologo" "cmTC_17ebd\fast"
    Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/BIN/amd64/cl.exe -- broken
    CMake Error at C:/Program Files/CMake/share/cmake-3.13/Modules/CMakeTestCXXCompiler.cmake:45 (message):
      The C++ compiler
    
        "C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/BIN/amd64/cl.exe"
    
      is not able to compile a simple test program.
    
      It fails with the following output:
    
        Change Dir: C:/Users/Stephen/AppData/Local/Temp/QtCreator-fOmVVw/qtc-cmake-qIxxBLXW/CMakeFiles/CMakeTmp
        
        Run Build Command:"jom" "/nologo" "cmTC_17ebd\fast"
        The system cannot find the file specified
        Generator: execution of make failed. Make command was: "jom" "/nologo" "cmTC_17ebd\fast"
    

    On the one computer which we haven't upgraded yet, so it still runs Qt Creator 4.8.2, everything still works. However, I can't figure out how to roll back, nor how to use the Maintenance Tool to upgrade Qt itself without it automatically upgrading Qt Creator as well.

    Has anyone else seen this problem?


  • Qt Champions 2018

    Hello @eos-pengwern

    I cannot really comment to your original problem, but

    However, I can't figure out how to roll back, nor how to use the Maintenance Tool to upgrade Qt itself without it automatically upgrading Qt Creator as well.

    Because that is indeed not possible and I'm not happy with that situation as well.

    What you can do, is to install the older version parallel to the one from MaintenanceTool with an offline installer from here: http://download.qt.io/official_releases/qtcreator/4.8

    In the worst case, you have to configure your Qt versions and Kits again, but most often you can just use both versions in parallel.

    Regards



  • Now that's interesting; thank you.

    I installed v.4.8.2 alongside v.4.9.0, rebuilt my kit manually (as turned out to be necessary), and...

    Exactly the same problem, still.

    So maybe v.4.9.0 is a red herring - maybe there's some other problem common to all the systems that have it installed; or maybe there's something else that it breaks when it is installed.

    It looks like I need to so something more systematic, uninstalling Qt altogether and then putting the components back one at a time, not using the installer so as to avoid the automatic installation of 4.9.0. That will take some time, though.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.