Qt doesn't find MSVC2017 compiler - installed from VS Build Tools 2019

  • Hi,
    I did a new install after some time doing nothing with Qt/C++.
    Win10 Pro x64, Qt via online installer, v5.12.3 with precompiled binaries for MSVC2015 and 2017.
    I used Visual Studio Build Tools 2019 to get the compilers, VSBT2017 seems not available anymore.
    In there I selected

    • MSVC v140 (VS2015, 14.00)-Buildtools
    • MSVC v141 (VS2017, 14.16)
    • MSVC v142 (VS2019, 14.20) - apparently needed for CMake-tools, which I need as well (?)

    When starting QTCreator the only compilers that are available for selection are 'MS Visual C++ Compiler 14.0' (so MSVC2015) and '16.0' (which seems to be MSVC2019). So the one I'd actually want, MSVC2017 is missing. I accumulated that much info as that this might be due to new folder structures of Visual Studio related stuff, but no solution was presented, also this was from last year, when Build Tools 2019 weren't available yet.

    What I also read was that Qt uses this file:
    "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Auxiliary\Build\vcvarsall.bat"
    to get the location of the compilers. In Build Tools 2019 this is the same file for v14.16 and v14.20, which are located in subfolders in
    "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.xx"
    and I guess this is where everything gets messed up?

    This is as far as I got. I tried reinstalling Build Tools with only MSVC2017 selected, but that only left me with no compiler at all available in Qt. Maybe I could make a custom entry for the compiler in Qt, but I wouldn't know how to set that up. I'm able to program the things I want but anything beyond that isn't really in my skillset.

    I didn't find anything recent about that, which confuses me a bit, as I can't be the only one with that problem. So I was hoping anyone here stumbled over that as well and found a solution.

    Thanks for any help!

  • Qt Champions 2018

    @Photatum said in Qt doesn't find MSVC2017 compiler - installed from VS Build Tools 2019:

    VSBT2017 seems not available anymore


    I'm not sure whether Qt already supports VS2019.

  • Ah, I missed that, thanks. It only said Visual Studio 2017, but the Build Tools are available on the following sub-page.

    As far as precompiled versions go VS2019 isn't available, but as I said (maybe a bit convoluted), I tried to install the MSVC2017 compiler which is available in the 2019 Build Tools installer.
    The folder structure is different. When installing MSVC2015 via 2019, it creates
    "C:\Program Files (x86)\Microsoft Visual Studio 14.0..." and Qt finds it without problems.

    When installing MSVC2017 via 2019, it creates
    "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.16.27023"
    (under "\2019\BuildTools"!)

    while MSVC2017 via 2017 Build Tools results in
    "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023"

    The first one isn't recognised, the latter is. So either the 2019 Build Tools mess up the correct path or Qt doesn't find the compiler in the new path.

    This may be worth checking for future releases, I think?

    Anyway, thanks again, MSVC2017 works now.

  • Qt Champions 2018

    @Photatum I guess QtCreator needs to be adapted to different folder structure in order to recognise the compiler installed this way. I'm sure QtCreator developers are working on this :-) If not it is possible to file a change request.

Log in to reply

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