Details
-
Bug
-
Resolution: Done
-
P4: Low
-
Qt Creator 4.15.0
-
Windows 10 21H1
MSVC2019 64 bit
-
-
16df6164b0ecf95bf725e4dd5fd75e93a1836d19 (qt-creator/tqtc-qt-creator/6.0)
Description
- Create a new project.
I used a CMake-based Qt Console Application. - 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.
- 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. - In Projects mode, Build settings, edit the build environment. Add the directory where you created the header file to the environment variable "INCLUDE".
- 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.