(C++) Must put library in .cpp file, cannot use .h files

So, long story short, something broke in VS Code between 2019 and 2020. We used to create header files in src/main/include/ and our C++ files in /src/main/cpp/

For these screenshots, I’m uploading them to this gallery to get around the 2-link maximum.
When I add libraries to the .cpp files, intellisense has no issue:
(See Image 1)
When I put them in the .h files (where I need them), intellisense gets mad:
(See Image 2)
Despite intellisense having issues, the code compiles and our main code even runs on the robot. This is what intellisense complains about:
(See Image 3)

Interestingly, if I take them out, intellisense reacts by complaining that frc is not a class or namespace name:
(See Image 4)

Did anyone else have this issue? I’ve tried this on two computers now, both of them fresh installs on a clean version of Windows. I’m not a programmer, but I’m the only one on our team who can code somewhat well, so they’re counting on me to program our robot but I cannot fight with this software anymore, I’m losing my mind trying to make basic stuff work.

Other things I’ve tried:
Desktop Support is off
Build Project (Build Successful)
WPI C++: Refresh C++ Intellisense

Try the steps here: Intelli(non)sense Help

1 Like

Incredible. Both the bang-on response and the nuclear-missile-launch-routine needed to get Intellisense working in VS Code :laughing: I appreciate the help. Sorry for re-posting what seems to be the same question, I didn’t see this one pop up in my Googling. I’ll make sure to bookmark it, I have a feeling I’ll be doing this again sometime soon…

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