I am trying to compile a hello world program in Qt Using Qt Creator.
I am getting ‘cl’ is not recognized as an internal or external command.
I am using Windows 7 and both VS 2008 and 2010 installed in it.
When I use Mingw it is compiling fine but if use vs 2008 it is giving this error.
After Setting Env Path = ..;..;C:\Program Files\Microsoft Visual Studio 9.0\VC\bin also it is showing the same error.
That error happens because
clisn’t in your path. You need to add it there. The recommended way to do this is to launch a developer command prompt.Quoting the article Use the Microsoft C++ toolset from the command line:
As the article notes, there are several different shortcuts for setting up different toolsets – you need to pick the suitable one.
If you already have a plain Command Prompt window open, you can run the batch file
vcvarsall.batwith the appropriate argument to set up the environment variables. Quoting the same article:From the article, the possible values for the first argument are the following:
x86(x86 32-bit native)x86_amd64orx86_x64(x64 on x86 cross)x86_arm(ARM on x86 cross)x86_arm64(ARM64 on x86 cross)amd64orx64(x64 64-bit native)amd64_x86orx64_x86(x86 on x64 cross)amd64_armorx64_arm(ARM on x64 cross)amd64_arm64orx64_arm64(ARM64 on x64 cross)