• Register
0 votes
1k 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.

6 5 3
7,540 points

Please log in or register to answer this question.

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

9 7 4
38,600 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.

 

10 6 4
31,120 points

Related questions

0 votes
1 answer 13 views
13 views
Problem: First off I would like to say I've seen the previous questions on this site, I've tried every solution but none fit my use case or solves my problem. I am having trouble with the g++ complier being recognized, I've included this path: C:\ ... has double quotes around it , so i tried editing the path to contain double quotes around it and the path automaticlly changes back after saving.
asked Apr 25 sumaiya simi 43.9k points
0 votes
1 answer 235 views
235 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
0 votes
1 answer 16 views
16 views
Problem: When I use the command.I get this error > ERROR:'keytool' is not recognized as an internal or external command, operable program or batch file
asked May 4 salim1 60.6k points
0 votes
1 answer 7 views
7 views
Problem: Whenever I try and run mycommand.exe from my windows cmd.exe terminal, I get this error: ''mycommand.exe' is not recognized as an internal or external command, operable program or batch file' Then I also experienced a similar error when I tried to run C:\Program Files\My-App\Mobile.exe ''C:\Program' is not recognized as an internal or external command, operable program or batch file'
asked Apr 26 sumaiya simi 43.9k points
0 votes
1 answer 6 views
6 views
Problem: Whenever I try and run mycommand.exe from my windows cmd.exe terminal, I get this error: ''mycommand.exe' is not recognized as an internal or external command, operable program or batch file' Then I also experienced a similar error when I tried to run C:\Program Files\My-App\Mobile.exe ''C:\Program' is not recognized as an internal or external command, operable program or batch file'
asked Apr 25 sumaiya simi 43.9k points
0 votes
1 answer 29 views
29 views
Problem: 'ls' is not recognized as an internal or external command, operable program or batch file. I get this error when I try to glance at the files of my folder. cmd opened regularly(not as an admin). I've recently downloaded anaconda for python.During the installation process, there was a time when I allowed to add a PATH which was not recommended. 'ls' used to work well be.
asked Apr 25 muktaa 34.6k points
0 votes
1 answer 5 views
5 views
Problem: I have an installation of Git for Windows, but when I try to use the git command in Command Prompt, I get the following error: 'git' is not recognized as an internal or external command, operable program or batch file. How do I fix this problem?
asked Apr 25 muktaa 34.6k points
0 votes
1 answer 7 views
7 views
Problem: Following instructions found here (and elsewhere) I added '%USERPROFILE%\AppData\Roaming\Python\Python37\Scripts\aws' to Path (tried with and without \aws at the end).I clicked OK everywhere and restartet the CLI, but I am still getting "'aws' is not recognized as ... file." when typing aws at the command prompt (I restarted it after the path update). Any ideas what I might be missing?
asked Apr 25 sumaiya simi 43.9k points
0 votes
1 answer 2 views
2 views
Problem: Whenever I try and run mycommand.exe from my windows cmd.exe terminal, I get this error: ''mycommand.exe' is not recognized as an internal or external command, operable program or batch file' Then I also experienced a similar error when I tried to run C:\Program Files\My-App\Mobile.exe ''C:\Program' is not recognized as an internal or external command, operable program or batch file'
asked Apr 25 sumaiya simi 43.9k points
0 votes
1 answer 9 views
9 views
Problem: I have an installation of Git for Windows, but when I try to use the git command in Command Prompt, I get the following error: 'git' is not recognized as an internal or external command, operable program or batch file. How do I fix this problem?
asked Apr 25 sumaiya simi 43.9k points