|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools |
Rating:
|
Display Modes |
|
|
|
#1
|
|||
|
|||
|
Having trouble getting started with Eclipse
I've been following this guide to get started with the new C++ programming environment: Eclipse.
I got as far as "Creating your Benchtop Test Program", but then the SAMPLE PROGRAM ("Getting Started") wouldn't compile. I was presented with several errors, but then I followed the instructions to right-click the project name, Index > Rebuild. After this, only two errors remained. One was on line 7, where the Joystick was declared; the error: Code:
Multiple markers at this line - The type 'Joystick' must implement the inherited pure virtual method 'GenericHID::GetRawAxis' - The type 'Joystick' must implement the inherited pure virtual method 'GenericHID::GetRawButton' - The type 'Joystick' must implement the inherited pure virtual method 'GenericHID::GetPOV' Code:
Multiple markers at this line - Symbol 'endl' could not be resolved - Invalid arguments ' Candidates are: ? HALReport(?, ?, ?, const char *) ' - Symbol 'cerr' could not be resolved Last edited by nick818 : 03-01-2015 at 20:30. Reason: Fixed URL in second link. |
|
#2
|
||||
|
||||
|
Re: Having trouble getting started with Eclipse
This just solved our problem - same problem, different thread. Thanks to RufflesRidge!!!
Quote:
|
|
#3
|
|||
|
|||
|
Re: Having trouble getting started with Eclipse
This person mentioned they tried that. I would try it one more time, but if it doesn't work I would try building the project anyway, the build console may give a different error with more clues.
|
|
#4
|
|||
|
|||
|
Re: Having trouble getting started with Eclipse
I tried building again, and the build console gave this error:
Code:
arm-frc-linux-gnueabi-g++ -std=c++1y "-IC:\\Users\\Driver Station/wpilib/cpp/current/include" "-IC:\\Users\\Driver Station\\workspace\\uralzzrdhary\\src" -O0 -g3 -Wall -c -fmessage-length=0 -o "src\\Robot.o" "..\\src\\Robot.cpp" Cannot run program "arm-frc-linux-gnueabi-g++": Launching failed Error: Program "arm-frc-linux-gnueabi-g++" not found in PATH |
|
#5
|
|||
|
|||
|
Re: Having trouble getting started with Eclipse
Did you install the FRC toolchains from the installing Eclipse document? If so, try uninstalling them, rebooting, make sure the installer is copied somewhere on your main hard drive, then run the installer again. Open Eclipse and try building and see if the error still appears.
|
|
#6
|
|||
|
|||
|
Re: Having trouble getting started with Eclipse
Thanks, that worked!
I can now successfully build and deploy to the roboRIO, but the errors still appear next to the line numbers and next to the scroll bar in Eclipse (but not in the build console). Is there any way to fix this? |
|
#7
|
||||
|
||||
|
Re: Having trouble getting started with Eclipse
Eclipse's C++ indexer is really buggy. Just add #include <cstdint> right before you include WPILib.h.
|
|
#8
|
|||
|
|||
|
Re: Having trouble getting started with Eclipse
From Eclipse, Window > Preferences > C/C++ > Build > Environment
Ensure "Append variables to native environment" is selected. Click "Add..." In the Name: field, enter PATH In the Value: field, enter C:\frc\bin Click "OK" Click "Apply" Click "OK" to exit the Preferences dialog. |
|
#9
|
|||
|
|||
|
Re: Having trouble getting started with Eclipse
Quote:
Code:
Program "g++" not found in PATH Program "gcc" not found in PATH |
|
#10
|
|||
|
|||
|
Re: Having trouble getting started with Eclipse
I'm not sure if the current documentation says it or not, but in Beta we were told you can safely ignore those.
|
|
#11
|
|||
|
|||
|
Re: Having trouble getting started with Eclipse
I had a similar problem within Ecliplse. I even went to the trouble to find where the frc arm toolchain was (c:\frc\bin, in my case), and adding that to the system path. No joy.
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|