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

Code Model doesn't take INCLUDE variable into account

    XMLWordPrintable

Details

    • Windows
    • 16df6164b0ecf95bf725e4dd5fd75e93a1836d19 (qt-creator/tqtc-qt-creator/6.0)

    Description

      1. Create a new project.
        I used a CMake-based Qt Console Application.
      2. In main.cpp, include a non-existent header file, e.g.:
        #include <myfictitiousheader.h>
        

        Very soon the clang code model will complain that it can't find this file. Of course, the file doesn't exist. Building will fail, too.

      3. Create a file of that name somewhere on your machine.
        Clang and the compiler still complain about this file. Of course, they cannot find it.
      4. In Projects mode, Build settings, edit the build environment. Add the directory where you created the header file to the environment variable "INCLUDE".
      5. Build the project.
        The project can be built successfully, but the clang code model still complains.

      If the compiler is able to find the file, clang should be, too.

      Attachments

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

        Activity

          People

            kandeler Christian Kandeler
            rlohning Robert Löhning
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes