The problem of QtCreator on win
-
Hello, everyone, I use the QtCreator compiler of my project, often appear unable to compile the problem, use the compiler is the msvc2013 compiler, the error is:
'cl'is not an internal or external command, nor can it run the program or batch file.
J:\Programming\SourceCode\SeniorEditor\Build\Configure\Makefile.Debug [debug\moc_Configure.obj] Error jom: 1
J:\Programming\SourceCode\SeniorEditor\Build\Configure\Makefile [debug] Error jom: 2
J:\Programming\SourceCode\SeniorEditor\Build\Makefile [sub-Configure-make_first] Error jom: 2
14:58:52: process "D:\Qt\Tools\QtCreator\bin\jom.exe" exit, exit code 2.
While building/deploying project SeniorEditor Error (Desktop Qt 5.4.2 MSVC2013 OpenGL 32bit kit:)
Executing step When "Make"
There is no one who knows what is the problem, please help to see how to solve the problem. -
cl.exe is a program that controls the C/C++ compiler on windows (just google). So my guess is, your compiler/kit is not setup properly in QtCreator. When your project is open go to the project tab on the left side of the screen and check your settings.
Then check your kit setup for the compiler, in this case MSVC2013.
Make sure that the cl.exe file has it's path included in your path variable in windows. (should be done automatic when installing MSVC, or a restart might be needed). -
@Jeroentjehome Sorry, I just checked the qtcreator build tool settings, can detect and identify the MSVC2013 compiler
-
@Jeroentjehome Excuse me, is not set to go on the line, you have to set up their own PATH environment variables?
-
In Windows your able to read out the path and check for yourself. It should have set the path automatic when installing. Did you have other MSVC compilers installed before? Maybe remove the old version from you path so it will find the new one?
-
@Jeroentjehome Yes, I have MSVC2013, MSVC2008 and MSVC20.
-
@Jeroentjehome Yes, I have VS2008, VS2013 and VS2015.
-
@Jeroentjehome Sometimes, I go back home for a computer to open, and then every 2 days in the cl.exe to find out the error of the command of the computer, can be compiled, but it will be the same error, the recent emergence of information, whether it can help to solve the error?
-
Hi,
In your last post you mention that the cl sometimes works and sometimes not? Or am I mistaken?
It might be good that when you encounter this error you do a clean/run qmake/ build. Or just delete the entire 'release' shadow build folder. -
@Jeroentjehome I just tried to delete the build folder, the original notebook computer is still unable to compile, but after the replacement of the desktop, the compiler normal.
-
Hmm,
Well, then it seems that something must have gone wrong when you installed the notebook. Maybe reinstall MSVC and Qt and that might fix it.
Good for you that you are able to compile! -
@Jeroentjehome Thank you. I'll try.
-
@Jeroentjehome Sorry, I have tried to reinstall the Qt environment, is still invalid, online has said that the path to join the environmental variables PATH, QtCeator can not automatically identify the compiler path? I didn't join in before.
-
@Jeroentjehome Set the path to the PATH CL environment variable, or not.
-
@Jeroentjehome Will it be caused by MSVC2014? Can I from the QtCreator "build and run" setting, I use the Qt compiler settings is MSVC2013 ah.
-
Hi,
Yes it is, on Windows you can't mix and match. All of your libraries/application must be compiled with the same compiler. They are not compatible one with the other. So since you have the VS2013 package installed you must use Visual Studio 2013.
If you want to use Visual Studio 2015, you have to build Qt yourself at this time.
-
I'm not sure I understood what you wrote. Do you have both version installed on your machine ?
-
Did you check that your kits are setup properly ?