Qt wiki will be updated on October 12th 2023 starting at 11:30 AM (EEST) and the maintenance will last around 2-3 hours. During the maintenance the site will be unavailable.

QMake Exit Codes

From Qt Wiki
Revision as of 09:58, 30 June 2015 by NetZwerg (talk | contribs) (Moved content to page without minus seperator, removed broken links, updated layout, content)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

There seem to be no official documentation of exit codes for qmake. However, there are cases where the user is faced with such an exit code. The original list from 'initek' is no longer available.

0 Success
1 Command line error
2 Failed to find project file.
3 Error processing a project file, creating meta generator.
5 Error generating makefile
101 Failed to execute property action.

All of the above codes are generated in function runQMake() in the file main.cpp. The above list is exhaustive, i.e. there are no other codes that the user may be faced with.

The list below was created during a review of the qmake source code (the version in the source of Qt 5.1.1). The list is not guaranteed to be complete or correct. Please edit this article, if another error code appeared during qmake.

Code 0

Success. No errors encountered.

Code 1

The parsing of the commandline arguments has failed. Most probably a typo in the commandline. Look up "Running qmake" in the manual This should actually never happen when using Qt Creator.

Code 2

One of the project files cannot be found based on a call to QFile::exists(). The path in question is printed to stderr.

Code 3

The project file could not be evalutated correctly, or the meta file generator failed. (i.e. the meta files could not be created)

Code 5

Either the project or the make file could not be written (depending on qmake-mode). The filename of the makefile is printed to stderr.

Code 101

A property action failed:

  • Property action QMAKE_QUERY_PROPERTY: property not found in list
  • Property action QMAKE_SET_PROPERTY: internal error
  • cannot happen on property action QMAKE_UNSET_PROPERTY