Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

error MSB6006: "cmd.exe" exited with code 1 running QT application

i compiled QT 5.0.1 with visual stdio 2012 command prompt. when i create console application every thing is good and works but when i create QT Application it throw this error:

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

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

like image 940
Mahdi_Nine Avatar asked Apr 03 '13 08:04

Mahdi_Nine


3 Answers

Turn on verbose build output to find your exact problem, Tools -> Options -> Projects and Solutions -> Build and Run -> build output and build log verbosity.

My problem was using 'CONST' wrongly.

(Clean and Rebuild seems to temporarily fix the problem, but you have to do it every time.)

like image 56
Aralox Avatar answered Sep 30 '22 19:09

Aralox


I also faced the same issue and I have solved this.

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

<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 can not be found. This lead the compile error:

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

Correct the wrong name or path can fix this issue.

BTW, my project is a QT prj with vs2015 update3.

like image 28
Yuanhui Avatar answered Sep 30 '22 19:09

Yuanhui


I spent months to solve Visual Studio and QT build errors. The result is Visual Studio doesn't automatically update QT directory and path variable. Usually errors arise when you change QT installation directory, QT path variable, upgrade QT version or copy project to another PC. So the control steps as below:

  • First try to make your solution folder writeable and try rebuild.
  • Check your path variables.
  • Open (qtproject).vcxproj.user with notepad and check QT path and variable, correct if wrong.
  • Open (qtproject).vcxproj with notepad and check QT variables on custom build sections, correct if wrong.
like image 20
twister Avatar answered Sep 30 '22 17:09

twister