Solved :-1: error: Failed to retrieve MSVC Environment from "E:\Programs\Microsoft Visual Studio 9.0\VC\vcvarsall.bat x86": \Microsoft was unexpected at this time.
-
It shows “Desktop Qt 5.13.0 MSVS2015 64bit (default)” there.
This aligns with the version I downloaded and installed, and I see nothing wrong with the paths there.
The C++ compiler set there is “Microsoft Visual C++ Compiler 14.0 (amd” (this is all I can read because the combo box is too small).L. Spiro
-
@l-spiro From my experience, the MSVC compiler detection only works correctly if MSVC is installed in the default location. Is there a reason you installed it on drive E: ?
-
@aha_1980 Hard drive space.
L. Spiro
-
@l-spiro Ok, I understand.
Nevertheless, when using non-standard layouts, you're on your own when things go wrong.
But where did it get this path? The path itself is entirely valid. The BAT file is at that location and nothing is misspelled. It seems only to be an issue with the fact that there are spaces in the path.
The path is taken from the registry, IIRC.
L. Spiro about 4 hours ago
:-1: error: Failed to retrieve MSVC Environment from "E:\Programs\Microsoft Visual Studio 9.0\VC\vcvarsall.bat x86":
\Microsoft was unexpected at this time.When resp. where does this message appear exactly?
What you can also try is to use Creator 4.10: https://blog.qt.io/blog/2019/08/02/qt-creator-4-10-rc-released
I think this version allows you to select arbitrary
vcvars.bat
, but I'm not sure.Regards
-
It appears there.I intend to code in Visual Studio and use Creator sparingly, and this is just a sample. Do I need to worry about this error?
L. Spiro
-
@l-spiro said in :-1: error: Failed to retrieve MSVC Environment from "E:\Programs\Microsoft Visual Studio 9.0\VC\vcvarsall.bat x86": \Microsoft was unexpected at this time.:
I intend to code in Visual Studio and use Creator sparingly, and this is just a sample. Do I need to worry about this error?
Well, it means you cannot use this compiler. Does the MSVC 2015 compiler work in Creator? Can you show Tools > Options > Kits > Compilers?
-
All installations of Visual Studio are on E:\ and should be expected to have this same issue.L. Spiro
-
@l-spiro Can you show the kit you're using? Did you really configure 2015 compiler there?
-
@l-spiro said in :-1: error: Failed to retrieve MSVC Environment from "E:\Programs\Microsoft Visual Studio 9.0\VC\vcvarsall.bat x86": \Microsoft was unexpected at this time.:
Hard drive space.
As a workaround, try to use mklink to create a Directory Symbolic Link or a Directory Junction. Make
C:\Program Files (x86)\Microsoft Visual Studio 9.0\
point toE:\Programs\Microsoft Visual Studio 9.0\
(assuming you have 64-bit Windows). This will make your system think that Visual Studio is available in the C: drive.https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/mklink
-
This was all configured automatically. And since the 2015 Visual Studio version is what I selected, it seems this is all correct.I can try the symbolic link later today after sleeping.
L. Spiro