View Single Post
  #3   Spotlight this post!  
Unread 11-01-2016, 21:25
1452-Leo 1452-Leo is offline
Registered User
FRC #1452 (Omnicats)
Team Role: Alumni
 
Join Date: Dec 2014
Rookie Year: 2014
Location: Los Angeles
Posts: 44
1452-Leo is an unknown quantity at this point
Re: WPIlib not being included in new projects

Quote:
Originally Posted by euhlmann View Post
When you create projects through File > New > Wpilib > robot C++ project it should be adding the includes automatically. Check on the "paths and symbols" section if your project build settings, there should be a wpilib location listed under include paths. If there isn't, try setting up a new project with File > New > Wpilib > robot C++ project.

If the include path is listed but you still have errors, make sure you have correctly used the #include directive in your code. Also, you can try rebuilding your C++ index by right clicking your project > index > rebuild.
All the projects I create through WPILib don't have the includes, but they all have:
Code:
#include "WPILib.h"
at the top of the Robot.cpp. Also, rebuilding the index doesn't seem to fix it.

In Paths and Symbols > Includes > GNU C++, I have "${WPILIB}/cpp/current/include" and "/${ProjName}/src". The libraries tab just as an entry called "wpi" and the Library Paths tab just has "${WPILIB}/cpp/current/lib" again. Are my settings wrong here or could something else be the problem?

Thanks for all the help!