Solved QtCreator upgrade on Windows breaks retrieving MSVC environment
-
I upgraded QtCreator to 4.7 yesterday, and it now cannot load the environment variables for any toolchain. I am running Windows 7 64b and have multiple compilers installed, but they all have this error:
:-1: error: Failed to retrieve MSVC Environment from "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat x86_amd64": The command "C:\WINDOWS\system32\cmd.exe" could not be started.
For each toolchain I try, the correct path to vcvarsall is displayed. The previous version had no problems retrieving these paths. I can run the .bat files by hand.
My current workaround is to open a command shell, run the .bat script by hand to set the toolchain environment variables, and then run qtcreator from the shell. I will still get the error about not being able to retrieve the MSVC Environment, but the paths to the compiler is resolved so I can build my project anyway.
I'm under a time crunch and may not be responsive, but I am eager to resolve this so that I don't have to quit QtCreator every time I want to change my build environment. I've seen mentions of similar issues online, but no solution that is applicable.
Why is QtCreator failing to run the batch file? The path is explicitly given. My Path from the command shell prompt has the default system paths including c:\Windows\System32 for cmd. It says it can't start cmd, yet it is printing the exact path to it. It does not take long for the .bat file to run. Very confusing.
-
Hi @KRP1,
Please have a look at: https://bugreports.qt.io/browse/QTCREATORBUG-20829 which might be related.