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. Compiling for MSVC 32Bit - Kit setup
Forum Updated to NodeBB v4.3 + New Features

Compiling for MSVC 32Bit - Kit setup

Scheduled Pinned Locked Moved Solved Installation and Deployment
5 Posts 2 Posters 1.7k 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.
  • B Offline
    B Offline
    Bardfast
    wrote on 10 May 2022, 08:35 last edited by
    #1

    I have installed Qt Creator 7.01 with the 'Desktop Qt 5.15.2 MSVC2019 32Bit' kit, but the compiler for both C and C++ are indicated as '<No compiler>', and the 'Compilers' tab (page) does not list a suitable Auto-detected compiler.

    My question is, which version of Microsoft Visual Studio should I install, and will Qt autodetect it once installed?

    I have already installed Visual Studio 2022, but clearly that is not suitable.

    Thanks in advance for any assitance.

    1 Reply Last reply
    0
    • B Offline
      B Offline
      Bardfast
      wrote on 10 May 2022, 12:47 last edited by
      #5

      Thank you Chris - all sorted now.

      Initially I couln't find the vcvarsall.bat file, but after also installing the Desktop Development With C++ 'workload', the bat file did appear in the specified folder.
      Actually, Qt was then also able to Auto-detect the compiler, so it all worked out rather nicely.

      Thanks again.

      1 Reply Last reply
      1
      • C Offline
        C Offline
        Chris Kawa
        Lifetime Qt Champion
        wrote on 10 May 2022, 10:46 last edited by
        #2

        The answer is in the kit name already. For that kit you need VS 2019. But if you already have VS 2022 you can just add the older compiler. You don't have to install another VS version entirely.

        In VS2022 go to Tools->Get Tools and Features. In the installer switch to the "Individual components" tab and find "MSVC v142 - VS 2019 C++ x64/x86 build tools" and install that. There's a lot of similarly named components there so make sure you select the right one. After doing that Qt Creator should pick up the compilers automatically.

        1 Reply Last reply
        0
        • B Offline
          B Offline
          Bardfast
          wrote on 10 May 2022, 11:11 last edited by
          #3

          Hi Chris - thanks for your assistance.

          I did as you suggested, but despite rebooting my machine, Qt has not managed to Auto-detect the newly installed compiler. I tried selecting 'Re-detect' button on the Qt Kits 'Compilers' tab, but that had no effect.

          Do I need to manually configure it?
          Thanks again.

          1 Reply Last reply
          0
          • C Offline
            C Offline
            Chris Kawa
            Lifetime Qt Champion
            wrote on 10 May 2022, 11:34 last edited by Chris Kawa 5 Oct 2022, 11:36
            #4

            Ah yes, sorry. It seems Creator indeed can't automatically detect additional MSVC toolchains. I guess it only does that with full VS installations.

            No problem, you should be able to add a custom MSVC compiler that you just installed. In the initialization field enter

            C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat
            

            adjusting for your actual VS installation directory and version name (Community in my case). select x86 next to it and enter -vcvars_ver=14.2 in the empty field to the right.
            Then select VS2019 from the ABI list below, click Apply and you should be good to go.

            Just verify that it shows the correct x86 windows msvc2019 pe 32bit info in the grayed out fields. You should be able to select that compiler for your kit.

            1 Reply Last reply
            1
            • B Offline
              B Offline
              Bardfast
              wrote on 10 May 2022, 12:47 last edited by
              #5

              Thank you Chris - all sorted now.

              Initially I couln't find the vcvarsall.bat file, but after also installing the Desktop Development With C++ 'workload', the bat file did appear in the specified folder.
              Actually, Qt was then also able to Auto-detect the compiler, so it all worked out rather nicely.

              Thanks again.

              1 Reply Last reply
              1

              1/5

              10 May 2022, 08:35

              • Login

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