microsoft / microsoft/vscode-cmake-tools
vscode intellisense doesn't work with cmake
- Dominant language
- TypeScript
- Stars
- 1.7k
- Forks
- 546
- Avg merge
- 2d 16h
- Merged PRs (30d)
- 32
Description
Hi, I just want to use CMake with vscode and link with Opencv library. After configure the CMakeList.txt, everything works fine.
But when I am trying to add other head file and cpp file. The intellisense of vscode seems stop working.

It said #inlcude errors detected based on information provieded by the configuration provider settings.
What I set in settings is following the vscode instruction,

The project build and run successfully, so I think the problem is only for intellisense.
What I have tried else but didn't solve the error:
1.add include path to includePath and point compileCommands to compile_commands.json

Many thanks if can have some help.
- **Operating System**:
- **CMake Version**: <3.16.3>
- **VSCode Version**: <1.15.1>
- **CMake Tools Extension Version**: <1.5.3>
- **Compiler/Toolchain**:
Contributor guide
Research direction
Start by reproducing the report with the mentioned CMakeLists.txt, compile_commands.json, VS Code settings, Ubuntu, GCC 9.3.0, and the listed extension versions. Trace how CMake configuration supplies IntelliSense include information, then verify that adding header and cpp files no longer produces include errors while the project still builds and runs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cmake, cpp, opencv, vscode
- Domain
- build-system, developer-experience, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100