Failed to retrieve MSVC Environment ... The command "C:\Windows\system32\cmd.exe" could not be started.
-
Hello,
I have a problem after installing Qt 5.11 on my Computer (Windows 7 64 bit).
First I installed the Microsoft Visual C++ 2015 Redistributable (x86) because I need to compile with this due to given DLL files.
I downloaded and installed the Qt for MSVC 2015 x86 and tried to launch the Qt Creator 4.7.0. It takes around half a minute to start and I get immediately 23 Issues that all have in common:
"Failed to retrieve MSVC Environment ...
The command "C:\Windows\system32\cmd.exe" could not be started."It is also impossible to compile a short program.
The warning in the Kit is: "CMake configuration has no path to C++ compiler set, even though the kit has a valid tool chain"I tried reinstalling it several times now, but it does not change anything.
I hope you can help me. Everything happend after an update of Qt.
Thank you in advance ;)
-
@MGhsw said in Failed to retrieve MSVC Environment ... The command "C:\Windows\system32\cmd.exe" could not be started.:
Microsoft Visual C++ 2015 Redistributable (x86)
This is not a compiler, it's the C++ runtime. You need to install Microsoft Visual Studio and install MSVC 2015 through there.
-
Hi @MGhsw,
seems you hit QTCREATORBUG-20829. Please see there for reasons and possible solutions/workarounds.
-
@liuyu said in Failed to retrieve MSVC Environment ... The command "C:\Windows\system32\cmd.exe" could not be started.:
Hello, I have the same problem. How did you solve it?
The problem described in this thread was fixed in Qt Creator 4.7.1 (see https://bugreports.qt.io/browse/QTCREATORBUG-20829 )
What is your version of Qt Creator?
-
@liuyu said in Failed to retrieve MSVC Environment ... The command "C:\Windows\system32\cmd.exe" could not be started.:
Hello, my version is 4.8.2
- Try disabling your antivirus (see https://bugreports.qt.io/browse/QTCREATORBUG-20829 )
- Check that cmd.exe is still present on your PC (see https://forum.qt.io/topic/122397/failed-to-retrieve-msvc-environment-the-command-c-windows-system32-cmd-exe-could-not-be-started )
- If it still doesn't work, try upgrading to a newer version (the latest is Qt 5.15.2 + Qt Creator 4.14)