Thank you for reaching out.
Visual Studio IntelliSense is still using the wrong compiler settings. Even though you added all the include paths and flags, IntelliSense decides which compiler to mimic based on the PATH environment in your CMake preset. If /opt/gcc-15/bin is not first in PATH, IntelliSense falls back to /usr/bin/g++ and ignores the GCC 15 macros (like _Float32), so the squiggles remain.
- Add PATH override in your preset In your
linux-debugpreset, add:"environment": {"PATH": "/opt/gcc-15/bin:${penv:PATH}"}Show more lines This makes sure Visual Studio queries GCC 15 for IntelliSense instead of the default compiler. - Keep these settings you already did:
-
intelliSenseMode: "linux-gcc-x64" -
CMAKE_EXPORT_COMPILE_COMMANDS: ON -
copyAdditionalIncludeDirectoriesListandadditionalCompilerArgswith-isystempaths.
-
- Clean and rebuild caches:
- Close the folder in Visual Studio.
- Delete
%LOCALAPPDATA%\Microsoft\Linux\HeaderCache\1.0\Ubuntu. - Reopen the project → Delete Cache and Reconfigure → Build All.
- Verify detection: After reconfigure, check the CMake output in Visual Studio. It should show:
If it still showsC++ compiler: /opt/gcc-15/bin/g++/usr/bin/g++, the PATH override didn’t apply.
The missing piece is making /opt/gcc-15/bin the first entry in PATH for your preset. Without that, IntelliSense keeps using the wrong compiler macros, causing false errors.
Please let us know if you require any further assistance, we’re happy to help.
If you found this information useful, kindly mark this as "Accept Answer".