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

Creator passes C++-specific option to code model when editing a C file

    XMLWordPrintable

Details

    Description

      If I create an empty QBS project with just one C file (not C++!), Creator will show the following error:

      error: invalid argument '-std=gnu++11' not allowed with 'C'
      

       QBS file:

      import qbs
      
      Product {
          type: ["application"]
          Depends { name: "cpp" }
          files: [
              "main.c",
          ]
      }
      

      See the screenshot for the rest.

       

      Note: Recently I cannot attach a screenshot when posting the initial bug. It says, "Jira could not attach the file as there was a missing token. Please try attaching the file again."  Screenshot coming in first comment.

       

       

      Attachments

        Issue Links

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

          Activity

            People

              kosjar Nikolai Kosjar
              szhorvat Szabolcs Horvát
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes