VSCode include issues


#1

The errors are:

  1. #include errors detected. Please update your includePath.
  2. cannot open source file “stdint.h”
  3. cannot open source file “iostream”

Has anybody had these issues? And do you know how to fix it?


#2

This is basically saying that it can’t find those files. Make sure you’re pointing to the c++ STDLIB in your includePath (make sure it knows where to find the files when you set up your compiler)


#3

This sounds really dumb, but how am I supposed to do that??


#4

You don’t want to be setting anything manually. What’s likely happening is there is a bug when initially opening vscode with open files. To see if that’s the issue. Close all the files. Close vscode. Open vscode. Wait one minute. Then try opening your files.

Another thing is in the bottom right status bar there should be something that says linuxathena (debug). That’s there, right?


#5

no it says linuxathena (release) instead of debug…


#6

I had similar errors, this might help: VSCode Compilation Issues


#7

linuxathena (release) is fine too. You can run a build correctly, right? If you run the build robot code command, it builds successfully, right?


#8

yeah we got that to work out, now we have a problem where we can’t get the code to recognize Xbox Controllers… it says that the identifiers are “undefined”


#9

The namespace shim that existed in previous years does not exist anymore. You either need a using namespace frc; in your source files, or property scope variables like that. So it would need to be an frc::XboxController. We recommend the 2nd one, as using namespace is really bad practice.


#10

OK, next question, do you know what the linker error is??


#11

What linker error? You didn’t post about any. Post the full log and I can probably figure it out.