Intellisense issues

Hi Gang,

OK, I’ve looked through all of the past references to this issue on CD and I’ve still not been able to find a solution for C++ on WinDoze. After much digging, it appears that the issue is a missing “sal.h” file being referenced from Compiler.h in code related to the llvm (clang) compiler. I don’t have clang installed deliberately. But, it appears that the WPILib somehow references it. I get red squiggles on Robot.h having just created a TimedRobot example from the template. The sal.h reference appears to be brought in in a block that looks like:

#if defined (_MSC_VER)
#include “sal.h”
#endif

sal.h is part of MicroSloth’s “source-code annotation language” that’s part of the Visual Studio tool.

So, somewhere in WPILib there is a reference to clang that then looks to see if the Microsoft C compiler is installed and then tries to include a non-existent header file. Once it’s referenced in Robot.h, a bunch of other header files also complain about the missing sal.h file. Has anyone developed a fix for this? I’m using the 2020.2.2 code installation.

TIA,

Mike

The wpilib setup for Windows does not support clang. It is known to break, but it shouldn’t be possible for it to show up either, especially as long as you have the roboRIO compiler installed.

In vs code on the right side of the status bar. There’s one that looks like a platform, right? Either windowsx86-64 or linuxathena. Click it, make sure one of the linuxathena options is selected, and then follow the instructions here to reset intellisense.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.