wpilibsuite / allwpilib

Official Repository of WPILibJ and WPILibC
https://wpilib.org/
Other
1.07k stars 614 forks source link

error: type 'Encoder' could not be resolved #910

Closed woolfelucas closed 6 years ago

woolfelucas commented 6 years ago

Our team created a cpp project before we installed the updates, toolchains, and plugins for the 2018 season. After we installed all of it, this project updated itself just fine. Here is a sample of our robot code from that project as it stands today.

pre2018

However, there was an issue with an std function, which prevents us from outputting updates from our sensors, such as encoders. After some research we found that our issue was caused by how the project was initially built, and that we should try creating a new one. And so we did.

Creating the new project solved the std issue. However, a new issue came up wherein the Encoder type is not recognized at all. Below is a picture of the same sample of the same robot code, in a different project, though with identical libraries, includes, and library paths.

post2018

As you can see, the Encoder type is not being recognized, even though other WPILib types (and 3rd party types) are being recognized. The error is: "type 'Encoder' could not be resolved".

I've created 4 different projects, one of which was after I simply repaired the toolchain, another of which was after a reinstallation of everything (eclipse, FRCUpdateSuite, FRCtoolchains, PhoenixFramework, and FRC Plugins, in that order). I also tried migrating the plugins to a new workspace, wherein one of the projects was initialized. Yet, the same error is occurring for each project and the robot code cannot recognize the Encoder type, and only that.

I can't find any documentation on this issue. Any Ideas?

-Lucas, controls lead, FRC4039

PeterJohnson commented 6 years ago

This is probably not actually an error, but rather Eclipse is reporting a false positive in its Intellisense (interactive real-time assessment of errors). If your project can compile successfully it’s not actually an error.

woolfelucas commented 6 years ago

Thanks! I can't believe I forgot about that.