c++ – How do you fix Intellisense errors in a CMake project when Visual Studio Community is connected to WSL:Ubuntu?


I am running a CMake project in Visual Studio Community 2026 and it is connected to WSL: Ubuntu. It is running the Linux Debug configuration preset. WSL is running the gcc 15.1.0 compiler.

My C++ code builds and runs fine but I get hundreds of false-positive Intellisense errors. One example is the following:

Severity Code Description Project File Line Suppression State Details 
Error (active) E0020 identifier "_Float32" is undefined CppProgUbuntu - Linux Debug C:\Users\bsekl\AppData\Local\Microsoft\Linux\HeaderCache\1.0\Ubuntu\opt\gcc-15\include\c++\15.1.0\atomic 1692

It is apparent that this is happening because Intellisense is not using the correct system headers and preprocessor definitions for the target environment but I’m not sure how to fix it.

How do I fix this so that Intellisense functions properly and doesn’t report false-positive errors?

Leave a Reply

Your email address will not be published. Required fields are marked *