Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Qt doesn't find MSVC2017 compiler - installed from VS Build Tools 2019
Forum Updated to NodeBB v4.3 + New Features

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

Scheduled Pinned Locked Moved Solved Installation and Deployment
7 Posts 5 Posters 8.4k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    Photatum
    wrote on last edited by
    #1

    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!

    jsulmJ 1 Reply Last reply
    0
    • P Photatum

      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!

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

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

      VSBT2017 seems not available anymore

      https://visualstudio.microsoft.com/vs/older-downloads/

      I'm not sure whether Qt already supports VS2019.

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      3
      • P Offline
        P Offline
        Photatum
        wrote on last edited by
        #3

        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.

        jsulmJ J 2 Replies Last reply
        0
        • P Photatum

          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.

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @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.

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • P Photatum

            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.

            J Offline
            J Offline
            jaray200
            wrote on last edited by jaray200
            #5

            @Photatum

            How did you get the 2017 build tools? I am running into this exact same issue.

            Looking at https://visualstudio.microsoft.com/vs/older-downloads/ I see the build tools for 2015, but the 2017 ones are no where to be found.

            EDIT:
            For other people who come across this, I was finally able to find a download. https://docs.microsoft.com/en-us/visualstudio/releasenotes/vs2017-relnotes This is the only place I could find a copy of the 2017 Community Edition. I have not been able to find a copy of just the build tools though.

            aha_1980A 1 Reply Last reply
            0
            • J jaray200

              @Photatum

              How did you get the 2017 build tools? I am running into this exact same issue.

              Looking at https://visualstudio.microsoft.com/vs/older-downloads/ I see the build tools for 2015, but the 2017 ones are no where to be found.

              EDIT:
              For other people who come across this, I was finally able to find a download. https://docs.microsoft.com/en-us/visualstudio/releasenotes/vs2017-relnotes This is the only place I could find a copy of the 2017 Community Edition. I have not been able to find a copy of just the build tools though.

              aha_1980A Offline
              aha_1980A Offline
              aha_1980
              Lifetime Qt Champion
              wrote on last edited by
              #6

              @jaray200 you can use the 2019 build tools with a 2017 Qt version. MSVC 2017 will be dropped soon anyway, as its buggy.

              Regards

              Qt has to stay free or it will die.

              1 Reply Last reply
              0
              • S Offline
                S Offline
                Sali
                wrote on last edited by
                #7

                You can configure Qt Creator's compiler to pick up vs2017 compiler installed with VS2019 build tool by passing "amd64 -vcvars_ver=14.16.27023" arguments to the "Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Auxiliary\Build\vcvarsall.bat" script.

                1 Reply Last reply
                0

                • Login

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • Users
                • Groups
                • Search
                • Get Qt Extensions
                • Unsolved