Error MSB6006: "cmd.exe" exited with code 1 running by the QT application

I compiled QT 5.0.1 with the visual command stdio 2012. when I create a console application, everything works fine, but when I create a QT application, it throws this error:

Error 1 error MSB6006: "cmd.exe" exited with code 1 

(QT visual stdio qt-vs-addin-1.2.0 )

+6
source share
3 answers

Turn on the detailed output of the assembly to find your exact problem, Tools -> Options -> Projects and Solutions -> Build and Run -> Build Output and Build Journal Verbosity.

My problem misused "CONST".

("Clean" and "Restore" seem to fix the problem temporarily, but you have to do it every time.)

+4
source

I also ran into the same problem and I solved it.

I have a XXX.qrc file in my project to include some resource file, for example xxx.png, xxx.gif or any image files, for example:

 <RCC> <qresource prefix="/MocapServer"> <file>Resources/mocapServer.qss</file> <file>Resources/button/disable.png</file> <file>Resources/button/unused.png</file> <file>Resources/button/config_dialog_close.png</file> <file>Resources/button/u73.jpg</file> <file>Resources/button/progressbar.png</file> ... 

but one file in XXX.qrc was not found. This will result in a compilation error:

Error 1 error MSB6006: "cmd.exe" completed with code 1 '

Correct the wrong name or path can fix this problem.

By the way, my project is QT prj with vs2015 update3.

+2
source

I spent several months resolving Visual Studio and QT build errors. As a result, Visual Studio does not automatically update the QT directory and path variable. Typically, errors occur when you change the QT installation directory, the QT path variable, update the QT version, or copy the project to another computer. Thus, the management steps are as shown below:

  • First try writing down the folder with your solution and try rebuilding.
  • Check path variables.
  • Open (qtproject) .vcxproj.user with notepad and check the path and QT variable, correct if it is wrong.
  • Open (qtproject) .vcxproj with notepad and check the QT variables in the custom assembly lines, correct if they are wrong.
+1
source

All Articles