简体   繁体   中英

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)

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.)

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.

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.

today i encountered same issue as well.

After several attempts, i found that there is a space(char:' ') in my project path.After changing my project to a none-space path, the issue has been solved.

Was facing same issue. Try checking out detailed logs by setting verbose to diagnostic. In my case, path of a dependency was missing from environment variables. Check if all paths are entered. For Qt try adding path for bin and qmake.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM