WPI Library

My team recently reset our programming laptop, there was a lot of junk on it. Every since then VSCode wont see WPI Library. I followed the FIRST Installation Guide step by step, but it wont work. Any help appreciated.


Are you getting any sort of error messages?

What exactly doesn’t work?

The only error message I am getting is that it cannot find WPILib.h, although I look at the dependencies and see it then I look at the added libraries and the WPI commands are there. So I don’t know where I went wrong

VSCode cannot find the WPI Library

Did you completely reinstall WPILib? That might be your solution. Completely uninstall VSCode, then reinstall with the WPILib GitHub’s guide. https://github.com/wpilibsuite/allwpilib/releases

Ok I will try that. Thanks so much

I tried uninstalling, then reinstalling WPILib but that still didn’t work. Also note, it does this for everything dependent on the WPILib library. Here is a picture of the exact error in VSCode:

There is no WPILib.h. What you need is

#include <frc/WPILib.h>

Ohhh ok. Such a simple fix. Thank you soooooo much

Just a note, it looks like your code is possibly from a previous years, and many things have changed. Specifically frc/WPILib.h is deprecated and marked to be removed from 2022. It’s better to include the specific headers that you need.