|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
WPIlib not being included in new projects
I just finished setting up Eclipse with the FRC C++ plugin on my Mac and for some reason, WPIlib is not being included in new projects. Also, the "Add Include" option is greyed out. I can open a new sample robot project, but it is filled with errors on almost every line. Does anyone know how to fix this? Thanks!
|
|
#2
|
||||
|
||||
|
Re: WPIlib not being included in new projects
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. |
|
#3
|
|||
|
|||
|
Re: WPIlib not being included in new projects
Quote:
Code:
#include "WPILib.h" 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! |
|
#4
|
|||
|
|||
|
Re: WPIlib not being included in new projects
Just update my Eclipse to Mars, reinstalled all the plugins, and reinstalled the toolchain. The FRC libraries are now being included (yay!) but there are still some other issues. It's giving me some basic C++ errors like "fatal error: iostream: no such file or directory" and not recognizing anything from the standard library. I have rebuild the index and everything from Paths and Symbols looks the same as before. Any ideas? Thanks!
|
|
#5
|
|||
|
|||
|
Re: WPIlib not being included in new projects
If you right click the project, click Properties, expand C/C++ Build, hit Settings, then on the right side Tool Settings -> Cross Settings, there will be a Path element. Make sure that it's pointing at the correct location for your machine: if it's not, update it to point at the bin directory of the installed toolchains.
|
|
#6
|
|||
|
|||
|
Re: WPIlib not being included in new projects
Quote:
|
|
#7
|
|||
|
|||
|
Re: WPIlib not being included in new projects
It should be the path that you see when you run a
Code:
which arm-frc-linux-gnueabi-g++ |
|
#8
|
|||
|
|||
|
Re: WPIlib not being included in new projects
Quote:
Code:
18:19:40 **** Incremental Build of configuration Debug for project 1452-Omnicats-2016 **** Info: Internal Builder is used for build arm-frc-linux-gnueabi-g++ -std=c++1y -I/Users/****/wpilib/cpp/current/include "-I/Users/****/FRC 2016/1452-Omnicats-2016/src" -O0 -g3 -Wall -c -fmessage-length=0 -o src/Robot.o ../src/Robot.cpp In file included from ../src/Robot.cpp:1:0: /Users/****/wpilib/cpp/current/include/WPILib.h:13:20: fatal error: iostream: No such file or directory #include <iostream> |
|
#9
|
||||
|
||||
|
Re: WPIlib not being included in new projects
Quote:
|
|
#10
|
|||
|
|||
|
Re: WPIlib not being included in new projects
I never figured it out, I just switched to bootcamp and it works there.
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|