I want to add the MSVC 2017 compiler correctly inside my Qt 5.13, I know where to add it! But, don't know : "How to? What is required to be filled inside the add compiler's menu?"
I have tried too many things. I have a long long story with Qt's main problem! My main problem is : "module machine type 'x64' conflicts with target machine 'x86'" which appears in the console when I build the Qt application! I am going to include some of the things that I have tried :
My next thing to fix (actually try) is this :
The picture above contains the compiler's path and Make's path. I need to find the Make path tool, I think it is required, isn't it? I tried to run the program without Make step, ONLY qmake step. Which led me into another problem when running the program : "An Error has Occured when trying to Build/Deploy your program". I filled the compiler's path correctly, but I don't know how to fill the make path, I don't even know what is make path. Note that Qt is not giving me any result because the make path is not filled correctly!
I hope that everything is described and all the information that you need is already included in the story above!
You specify the compiler to use for each kit in Edit > Preferences > Kits. To add a C or C++ compiler, select Edit > Preferences > Kits > Compilers > Add. Select a compiler in the list, and then select C or C++. To clone the selected compiler, select Clone.
As mentioned, Qt 6 makes C++17 a requirement in order to adopt its more advanced language features.
GCC is a fine compiler, and can produce code that has pretty much the same performance, if not better, than MSVC. It is missing some low-level Windows-specific features though.
More precisely, the default path where you'll find the compiler is C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin .
You cannot add MSVC manually to Qt Creator. You do need to have it auto-detected.
Also the mechanisms of detection changes depending on MSVC version and Qt Creator version. So be sure to use the latest version of Qt Creator (4.9.2 at this time) to make sure all your installed MSVC toolchain are detected.
Also given you comment you seem to confuse 64-bit and 32-bit.
x86
means 32-bit and amd64
means 64-bit.
This gives:
x86
32-bit compiler that produces 32-bit exex86_amd64
32-bit compiler that produces 64-bit exeamd64
64-bit compiler that produces 64-bit exeamd_x86
64-bit compiler that produces 32-bit exeSo if you wan to produce 32-bit programs, you can use x86
or amd64_x86
. If you want to produce 64-bit programs, you can use amd64
or x86_amd64
.
If at some point you want to compile a Qt porgam, but Qt Creator does not recognize your MSVC toolchain, you still have a solution:
Qt 5.12.4 (MSVC 2017 64-bit)
from the start menuC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat amd64
qmake
and enjoyIf you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With