• Register
0 votes
167 views

Problem :

I am new to Qt. I am trying to compile the hello world program in Qt Using Qt Creator.

But I am getting following error ” 'cl' is not recognized as an internal or external command.”

I am on Windows 8 and also both Vs 2008 and 2010 installed on my machine. When I use Mingw it is compiling correctly but if if I am using it vs 2008 it is giving the above mentioned error.

Even after Setting my Env Path =..;..;C:\Program Files\Microsoft Visual Studio 9.0\VC\bin also it is showing the same error.

7.5k points

2 Answers

0 votes

Solution :

I guess cl is not present in your path. So now you just need to add it there. The recommended way to do it is by launching a developer command prompt.

To open the Developer Command Prompt window please follow below steps

1.  For Windows 8 in Start screen type Visual Studio Tools. Once the search results change as you type; when Visual Studio Tools appears, just select it.

For earlier versions of Windows you need to choose Start, and then in the search box, type Visual Studio Tools. When Visual Studio Tools appears in the search results, select it.

2.  In your Visual Studio Tools folder please open the Developer Command Prompt for your version of Visual Studio. If want to run it as administrator please open the shortcut menu for the Developer Command Prompt and select Run as Administrator

36.1k points
0 votes

Solution:

I conceive cl isn't in your path. You require to include it there. The recommended method to do this is to launch a developer command prompt.

To open a Developer Command Prompt window

  1. With the Windows 8 Start screen showing, type Visual Studio Tools. Look-out that the search results alter as you type; at the time Visual Studio Tools appears, select it.

    On prior versions of Windows, select Start, and then in the search box, type Visual Studio Tools. At the time Visual Studio Tools seems in the search results, select it.

  2. In the Visual Studio Tools folder, open the Developer Command Prompt for your version of Visual Studio. (To run as administrator, open the shortcut menu for the Developer Command Prompt and select Run as Administrator.)

As the article notes, there are various diverse shortcuts for setting up different toolsets - you require to pick the suitable one.

In case you meanwhile have a plain Command Prompt window open, you can run the batch file vcvarsall.bat with the appropriate argument to set up the environment variables. Quoting the same article:

To run vcvarsall.bat

  1. At the command prompt, alter to the Visual C++ installation directory. (The location relies on the system and the Visual Studio installation, however a typical location is C:\Program Files (x86)\Microsoft Visual Studio version\VC.) For instance, enter:

cd "\Program Files (x86)\Microsoft Visual Studio 12.0\VC"
  1. To configure this Command Prompt window for 32-bit x86 command-line builds, at the command prompt, enter:

vcvarsall x86

I had the similar problem. Attempt to create a bat-file to begin the Qt Creator. Include something like this to the bat-file:

call "C:\Program Files\Microsoft Visual Studio 9.0\VC\bin\vcvars32.bat"  
"C:\QTsdk\qtcreator\bin\qtcreator"

Now I can compile and obtain:

jom 1.0.8 - empower your cores
11:10:08: The process "C:\QTsdk\qtcreator\bin\jom.exe" exited normally.

 

15.3k points
edited by

Related questions

0 votes
1 answer 53 views
53 views
Problem : I am facing following MinGW issue: 'gcc' is not recognized as an internal or external command, operable program or batch file.
asked Nov 18, 2019 peterlaw 6.9k points
1 vote
1 answer 124 views
124 views
Problem: I installed flask in my system by running the command: pip install flask Collecting flask Downloading https://files.pythonhosted.org/packages/f2/28/2a03252dfb9ebf377f40fba6a7841b47083260bf8bd8e737b0c6952df83f/Flask-1.1.2-py2.py3-none-any.whl (94kB) |████████████████████████████████| ... operable program or batch file. Whats the problem running this can any one tell me? Thanks in advance.
asked May 12 samhaz 5k points
0 votes
1 answer 28 views
28 views
I am new to python programming. I am using atom IDE or atom editor for my python programs but every time I try to run a code or a script from my atom editor it gives me an error like : atom 'python' is not recognized as an internal or external command, operable ... and atom for 64 bit windows. Can anyone figure out what the problem really is and how can I solve this problem and run my code.
asked Mar 10 LizzyM 5.7k points
0 votes
1 answer 487 views
487 views
Problem : I am new to type script and unable to compile my type script file. When I try to hit Ctrl+Shift+B in my VS Code, I face below error " ‘Tsc' is not recognized as an internal or external command, operable program or batch file." I used ... C:\Users\mphil\AppData\Roaming\npm\node_modules\typescript\bin\tsc C:\Users\mphil\AppData\Roaming\npm `-- typescript@2.1.5 How to fix above error?
asked Feb 15 mphil 2.3k points
0 votes
1 answer 638 views
638 views
Problem : I am beginner in the node.js .Currently I am trying to install node.js using the below command npm install nodemon --save. But when I try to run a server with below command nodemon server.js. then in my terminal I face below error: “Nodemon is not recognized as internal or external command, operable program or batch file”
asked Feb 13 mphil 2.3k points