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

Clang code model can't find clang headers when built with cmake

    XMLWordPrintable

    Details

    • Commits:
      86348d562214a27574ddbd65825414ae7e731438 (qt-creator/qt-creator/4.14)

      Description

      If qtcreator 4.14 is built with cmake (against a system clang) the clang code model can't find the clang headers in projects that use a kit with the clang compiler, giving errors such as

      Warning: The code model could not parse an include file
      ...
      wchar.h:35:10: error: 'stddef.h' file not found
      

      This doesn't happen if I build it with qmake. Looking at the output of 'strings /usr/lib/qtcreator/plugins/libClangCodeModel.so', when built with qmake I see the path

      /usr/lib/clang/11.0.0/include
      

      which is where the headers are located. When built with cmake, I see

      lib/qtcreator/clang/lib/clang/11.0.0/include
      

      which is wrong.

       

        Attachments

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

          Activity

            People

            Assignee:
            con Eike Ziller
            Reporter:
            arojas Antonio Rojas
            Votes:
            2 Vote for this issue
            Watchers:
            8 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes