Gavin.G Gavin.G - 3 months ago 155
C++ Question

cant compile in Qt said both error 1 and error 2

I was writing a program for my physics project, and I want to make a dialog to play a few notes' recording from my abs pipe instrument, it compiled and ran perfectly. But when i closed the software, and tried to reopen and make a new project, it just won't compile and came with these errors.
Here's the compile output, i don't know why and i tried the solutions from other similar solved questions, but they don't work...Please help me, this project is due tomorrow and i just started Qt today


19:51:24: Running steps for project acoustic...

19:51:24: Configuration unchanged, skipping qmake step.

19:51:24: Starting: "G:\Qt\Tools\QtCreator\bin\jom.exe"

G:\Qt\Tools\QtCreator\bin\jom.exe -f Makefile.Debug

cl -c -nologo -Zc:wchar_t -FS -Zc:strictStrings -Zc:throwingNew -Zi -MDd -GR -W3 -w34100 -w34189 -w44996 -w44456 -w44457 -w44458 -wd4577 -EHsc /Fddebug\acoustic.pdb -DUNICODE -DWIN32 -DWIN64 -DQT_QML_DEBUG -DQT_MULTIMEDIA_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I..\acoustic -I. -IG:\Qt\5.7\msvc2015_64\include -IG:\Qt\5.7\msvc2015_64\include\QtMultimedia -IG:\Qt\5.7\msvc2015_64\include\QtWidgets -IG:\Qt\5.7\msvc2015_64\include\QtGui -IG:\Qt\5.7\msvc2015_64\include\QtANGLE -IG:\Qt\5.7\msvc2015_64\include\QtNetwork -IG:\Qt\5.7\msvc2015_64\include\QtCore -Idebug -I. -IG:\Qt\5.7\msvc2015_64\mkspecs\win32-msvc2015 -Fodebug\ @C:\Users\gavin\AppData\Local\Temp\main.obj.2892.0.jom

'cl' is not recognized as an internal or external command,

operable program or batch file.

jom: C:\Users\gavin\Desktop\acoustic application\build-acoustic-Desktop_Qt_5_7_0_MSVC2015_64bit-Debug\Makefile.Debug [debug\main.obj] Error 1
cl -c -nologo -Zc:wchar_t -FS -Zc:strictStrings -Zc:throwingNew -Zi -MDd -GR -W3 -w34100 -w34189 -w44996 -w44456 -w44457 -w44458 -wd4577 -EHsc /Fddebug\acoustic.pdb -DUNICODE -DWIN32 -DWIN64 -DQT_QML_DEBUG -DQT_MULTIMEDIA_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I..\acoustic -I. -IG:\Qt\5.7\msvc2015_64\include -IG:\Qt\5.7\msvc2015_64\include\QtMultimedia -IG:\Qt\5.7\msvc2015_64\include\QtWidgets -IG:\Qt\5.7\msvc2015_64\include\QtGui -IG:\Qt\5.7\msvc2015_64\include\QtANGLE -IG:\Qt\5.7\msvc2015_64\include\QtNetwork -IG:\Qt\5.7\msvc2015_64\include\QtCore -Idebug -I. -IG:\Qt\5.7\msvc2015_64\mkspecs\win32-msvc2015 -Fodebug\ @C:\Users\gavin\AppData\Local\Temp\dialog.obj.2892.31.jom

'cl' is not recognized as an internal or external command,

operable program or batch file.

jom: C:\Users\gavin\Desktop\acoustic application\build-acoustic-Desktop_Qt_5_7_0_MSVC2015_64bit-Debug\Makefile.Debug [debug\dialog.obj] Error 1

jom: C:\Users\gavin\Desktop\acoustic application\build-acoustic-Desktop_Qt_5_7_0_MSVC2015_64bit-Debug\Makefile [debug] Error 2
19:51:25: The process "G:\Qt\Tools\QtCreator\bin\jom.exe" exited with code 2.

Error while building/deploying project acoustic (kit: Desktop Qt 5.7.0 MSVC2015_64bit)

When executing step "Make"

19:51:25: Elapsed time: 00:00.

Answer

You need to review your setup:

'cl' is not recognized as an internal or external command, operable program or batch file.

This means that the build process can't find the program cl.exe.
You may have to tell the build process where the program is or alter your path so that the operating system can find it.

Comments