Qt Creator MSVC2019 Kit Configuration
-
Hi everyone,
Recently, I purchased a new laptop and I'm installing everything on it. However, I failed to set up the MSVC2019 Kit in Qt Creator.
Before, I firstly install VS2019 with MSVC2019 and "C++ Desktop Development". Then, Qt Creator can auto detect MSVC2019 compiler correctly.
Now, VS2022 is released and I still installed VS2022 first. Also, I included MSVC2019, MSVC2017, Windows10 SDK, "C++ Desktop Development". Qt Creator detects the complier as Microsoft Visual C++ Compiler 17.0.xxxxx.xxx (amd64), etc. However, the ABI shows x86-windows-msvc2005-pe-64bit, which cannot be used for Qt Version built with MSVC2019 64-bit, or any other Qt version. So, my question is, why the auto detected compiler's ABI shows msvc2005 even I installed the latest VS2022 and latest msvc toolchain? Thanks!
Best regards.
-
Hi everyone,
Recently, I purchased a new laptop and I'm installing everything on it. However, I failed to set up the MSVC2019 Kit in Qt Creator.
Before, I firstly install VS2019 with MSVC2019 and "C++ Desktop Development". Then, Qt Creator can auto detect MSVC2019 compiler correctly.
Now, VS2022 is released and I still installed VS2022 first. Also, I included MSVC2019, MSVC2017, Windows10 SDK, "C++ Desktop Development". Qt Creator detects the complier as Microsoft Visual C++ Compiler 17.0.xxxxx.xxx (amd64), etc. However, the ABI shows x86-windows-msvc2005-pe-64bit, which cannot be used for Qt Version built with MSVC2019 64-bit, or any other Qt version. So, my question is, why the auto detected compiler's ABI shows msvc2005 even I installed the latest VS2022 and latest msvc toolchain? Thanks!
Best regards.
@Hammerfall said in Qt Creator MSVC2019 Kit Configuration:
So, my question is, why the auto detected compiler's ABI shows msvc2005 even I installed the latest VS2022 and latest msvc toolchain? Thanks!
Best regards.Which Qt Creator version are you using?
AFAIK, only the current version (Qt Creator 5.0.3) doe not support MSVC2022, you need to wait until Qt Creator 6 is released or use the preview version (Qt Creator 6.0 RC1 ==> https://www.qt.io/blog/qt-creator-6-rc-released) -
@Hammerfall said in Qt Creator MSVC2019 Kit Configuration:
So, my question is, why the auto detected compiler's ABI shows msvc2005 even I installed the latest VS2022 and latest msvc toolchain? Thanks!
Best regards.Which Qt Creator version are you using?
AFAIK, only the current version (Qt Creator 5.0.3) doe not support MSVC2022, you need to wait until Qt Creator 6 is released or use the preview version (Qt Creator 6.0 RC1 ==> https://www.qt.io/blog/qt-creator-6-rc-released)@KroMignon Thanks for your reply. Yes, I'm currently using Qt Creator 5.0.3. For the Qt Version, I installed both Qt 5.15.0 and Qt 6.2.1 with MSVC2019 and MinGW. Actually, I'm not trying to use MSVC2022 and I just want to use MSVC2019. But Qt Creator's compiler auto detection shows the compiler's ABI is "msvc2005". Does this mean the current version of Qt Creator cannot correctly detect msvc compiler? Thanks!
Best regards,
-
@KroMignon Thanks for your reply. Yes, I'm currently using Qt Creator 5.0.3. For the Qt Version, I installed both Qt 5.15.0 and Qt 6.2.1 with MSVC2019 and MinGW. Actually, I'm not trying to use MSVC2022 and I just want to use MSVC2019. But Qt Creator's compiler auto detection shows the compiler's ABI is "msvc2005". Does this mean the current version of Qt Creator cannot correctly detect msvc compiler? Thanks!
Best regards,
@Hammerfall It appears you do have VS2022 installed, not VS2019. Look at the path of the 'Initialization' line in your screenshot above.
-
@Hammerfall It appears you do have VS2022 installed, not VS2019. Look at the path of the 'Initialization' line in your screenshot above.
@mchinand Thanks for your reply. I know I installed VS2022, but when I install it, I added the individual MSVC2019 build tool. Do you mean that Qt Creator cannot auto-detect the individual MSVC2019 build tool? Thanks!
-
Hmm, I'm not sure. Is there another vcvarsall.bat file specific to MSVC2019? It looks like you can specify a version when calling vcvarsall.bat but I don't know if that can be done here in QtCreator.
Edit: Looks like you can add options to vcvarsall.bat when you add a compiler manually. There's a box on the right of the 'Initialization' line for specifying options, but is grayed out for auto-detected compilers.
-
Hmm, I'm not sure. Is there another vcvarsall.bat file specific to MSVC2019? It looks like you can specify a version when calling vcvarsall.bat but I don't know if that can be done here in QtCreator.
Edit: Looks like you can add options to vcvarsall.bat when you add a compiler manually. There's a box on the right of the 'Initialization' line for specifying options, but is grayed out for auto-detected compilers.
@mchinand Thanks for your reply. I can only locate one vcvarsall.bat file in the C:\Program Files\Microsoft Visual Studio folder, which is the one auto detected by Qt Creator I showed before.
@KroMignon I also tried install Qt Creator 6.0 RC1 and it can successfully detect msvc2022. However, I don't have the Qt version for msvc2022. So, I think I have to wait for a msvc2022 Qt version. Thanks.
-
You can select the compiler you want to use via a vcvarsall.bat option. See its documentation. You will probably have to manually add the compiler and then specify the vcvarsall.bat options.
-
@mchinand Thanks for your reply. I can only locate one vcvarsall.bat file in the C:\Program Files\Microsoft Visual Studio folder, which is the one auto detected by Qt Creator I showed before.
@KroMignon I also tried install Qt Creator 6.0 RC1 and it can successfully detect msvc2022. However, I don't have the Qt version for msvc2022. So, I think I have to wait for a msvc2022 Qt version. Thanks.
@Hammerfall said in Qt Creator MSVC2019 Kit Configuration:
I also tried install Qt Creator 6.0 RC1 and it can successfully detect msvc2022. However, I don't have the Qt version for msvc2022. So, I think I have to wait for a msvc2022 Qt version. Thanks.
I have installed Qt Creator 6.0.1 and MSVC2002 on my PC.
With this configuration, I can compile Qt projects with Qt 5.12.x without any trouble.
Qt Creator has automatically create the corresponding Kit.