Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-15027

Wrong main() function in Non-Qt Plain Project templates for Desktop

    XMLWordPrintable

Details

    • 6bb78124abaf6493c3f76444ef3179bbdea01cbc

    Description

      When I create new project using "New File or Project..." -> "Non-Qt Project" -> "Plain C++ Project" it generates source file where main function defined as such:

      int main() {
      ...
      }
      

      Environment command line arguments are missing. Correct definition should look like:

      int main(int argc, char *argv[]) {
      ...
      }
      

      Such code breaks execution after return from main() to CRT and in some circumstances causes application to crash on exit (depends on platform, runtime version, compiler ABI, etc...)

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            hunger Tobias Hunger
            artem_pisarenko Artem Pisarenko
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes