Priority: P2: Important
Affects Version/s: Qt Creator 4.15.0
Fix Version/s: None
Component/s: C/C++/Obj-C++ Support
Environment:Windows 10 21H1
MSVC2019 64 bit
- Create a new project.
I used a CMake-based Qt Console Application.
- In main.cpp, include a non-existent header file, e.g.:
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.