Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. QtCreator upgrade on Windows breaks retrieving MSVC environment

QtCreator upgrade on Windows breaks retrieving MSVC environment

Scheduled Pinned Locked Moved Solved Qt Creator and other tools
2 Posts 2 Posters 1.6k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    KRP1
    wrote on last edited by
    #1

    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.

    aha_1980A 1 Reply Last reply
    0
    • K KRP1

      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.

      aha_1980A Offline
      aha_1980A Offline
      aha_1980
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi @KRP1,

      Please have a look at: https://bugreports.qt.io/browse/QTCREATORBUG-20829 which might be related.

      Qt has to stay free or it will die.

      1 Reply Last reply
      1

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved