Qt Creator and Visual C++ Compilers
-
Hello guys.
If I install Microsoft Build Tools in other drivers than C drive the problem is Qt Creator can't detect compilers of Microsoft Build Tools in Auto Detected section!
If I install it in C drive, there is no problem and compilers will be detected by Qt Creator successfully!
for better understanding, I tried to create and address compilers manually but at the end of the road I encounter errors!
Here is what I did in manual way:
First, I create two compilers using Add -> Custom -> one for C and one for C++
Second, I address cl.exe and nmake.exe for proper Visual C++ Compiler like the image below:
Third, I create a kit and set options like the image below:
But after I create simple Qt Console Project and try to build it these errors show:
So my questions are:
1_ How can I tell Qt Creator to fine Microsoft Visual C++ Compilers if they aren't in C drive?
2_How can I set Visual C++ Compiler manually if I want (above images) ?
Thank you so much! -
@Nima-Ghorab said in Qt Creator and Visual C++ Compilers:
1_ How can I tell Qt Creator to fine Microsoft Visual C++ Compilers if they aren't in C drive?
The way you added the Compiler and Kit looks correct.
But after I create simple Qt Console Project and try to build it these errors show
Did you tell your project to use your new Kit?
-
@Nima-Ghorab You cannot set up MSVC compilers manually.
-
@JKSH said in Qt Creator and Visual C++ Compilers:
Did you tell your project to use your new Kit?
Yes but I get those errors in the last image above!
@aha_1980 said in Qt Creator and Visual C++ Compilers:
@Nima-Ghorab You cannot set up MSVC compilers manually.
Why we can't do this manually?
Is this mean that we have to install MSVC in C drive?Thank you so much guys.
-
@aha_1980 said in Qt Creator and Visual C++ Compilers:
You cannot set up MSVC compilers manually.
TIL
-
@Nima-Ghorab said in Qt Creator and Visual C++ Compilers:
Why we can't do this manually?
Because environment variables needs to be proper set up for the compiler to work, and registry entries need to be correct.
Is this mean that we have to install MSVC in C drive?
At least that is the most easy solution. I always installed it at the default location.