Go to Post The world is run by those who show up. - AdamHeard [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rating: Thread Rating: 3 votes, 5.00 average. Display Modes
  #1   Spotlight this post!  
Unread 03-01-2015, 20:29
nick818 nick818 is offline
Registered User
AKA: Nicholas Currault
FRC #2840 (Blue Tide)
Team Role: Programmer
 
Join Date: Jan 2015
Rookie Year: 2014
Location: Paradise Valley, AZ
Posts: 6
nick818 is an unknown quantity at this point
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'
Another occurred on line 59 (the use of START_ROBOT_CLASS):

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
None of these errors make sense to me. Any help is appreciated.

Last edited by nick818 : 03-01-2015 at 20:30. Reason: Fixed URL in second link.
Reply With Quote
  #2   Spotlight this post!  
Unread 03-01-2015, 20:42
dougwilliams's Avatar
dougwilliams dougwilliams is offline
Engineer - Controls, Electronics
FRC #2053 (TigerTronics)
Team Role: Mentor
 
Join Date: May 2013
Rookie Year: 2013
Location: Vestal, NY
Posts: 109
dougwilliams is on a distinguished road
Re: Having trouble getting started with Eclipse

This just solved our problem - same problem, different thread. Thanks to RufflesRidge!!!

Quote:
Originally Posted by RufflesRidge View Post
What happens if you re-build the project index as shown in the Rebuilding the Index step here: http://wpilib.screenstepslive.com/s/...p-test-program
Reply With Quote
  #3   Spotlight this post!  
Unread 03-01-2015, 20:51
RufflesRidge RufflesRidge is offline
Registered User
no team
 
Join Date: Jan 2012
Location: USA
Posts: 989
RufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant future
Re: Having trouble getting started with Eclipse

Quote:
Originally Posted by dougwilliams View Post
This just solved our problem - same problem, different thread. Thanks to RufflesRidge!!!
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.
Reply With Quote
  #4   Spotlight this post!  
Unread 04-01-2015, 15:15
nick818 nick818 is offline
Registered User
AKA: Nicholas Currault
FRC #2840 (Blue Tide)
Team Role: Programmer
 
Join Date: Jan 2015
Rookie Year: 2014
Location: Paradise Valley, AZ
Posts: 6
nick818 is an unknown quantity at this point
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
No binary file was produced.
Reply With Quote
  #5   Spotlight this post!  
Unread 04-01-2015, 15:20
RufflesRidge RufflesRidge is offline
Registered User
no team
 
Join Date: Jan 2012
Location: USA
Posts: 989
RufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant future
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.
Reply With Quote
  #6   Spotlight this post!  
Unread 04-01-2015, 20:01
nick818 nick818 is offline
Registered User
AKA: Nicholas Currault
FRC #2840 (Blue Tide)
Team Role: Programmer
 
Join Date: Jan 2015
Rookie Year: 2014
Location: Paradise Valley, AZ
Posts: 6
nick818 is an unknown quantity at this point
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?
Reply With Quote
  #7   Spotlight this post!  
Unread 04-01-2015, 20:01
mhaeberli mhaeberli is offline
Registered User
FRC #3045
 
Join Date: Feb 2014
Location: Redwood City
Posts: 88
mhaeberli is on a distinguished road
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.
Reply With Quote
  #8   Spotlight this post!  
Unread 04-01-2015, 20:51
ThomasClark's Avatar
ThomasClark ThomasClark is offline
Registered User
FRC #0237
 
Join Date: Dec 2012
Location: Watertown, CT
Posts: 146
ThomasClark has much to be proud ofThomasClark has much to be proud ofThomasClark has much to be proud ofThomasClark has much to be proud ofThomasClark has much to be proud ofThomasClark has much to be proud ofThomasClark has much to be proud ofThomasClark has much to be proud ofThomasClark has much to be proud ofThomasClark has much to be proud of
Re: Having trouble getting started with Eclipse

Quote:
Originally Posted by nick818 View Post
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?
Eclipse's C++ indexer is really buggy. Just add #include <cstdint> right before you include WPILib.h.
Reply With Quote
  #9   Spotlight this post!  
Unread 08-01-2015, 11:20
dsgrieve dsgrieve is offline
Registered User
FRC #1307
 
Join Date: Jan 2015
Location: New Hampshire
Posts: 2
dsgrieve is an unknown quantity at this point
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.
Reply With Quote
  #10   Spotlight this post!  
Unread 13-01-2015, 18:21
mr_abomination mr_abomination is offline
Registered User
FRC #4733
 
Join Date: Feb 2014
Rookie Year: 2012
Location: Canada
Posts: 9
mr_abomination is an unknown quantity at this point
Re: Having trouble getting started with Eclipse

Quote:
Originally Posted by dsgrieve View Post
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.
Now we're getting the following errors:

Code:
Program "g++" not found in PATH
Program "gcc" not found in PATH
Reply With Quote
  #11   Spotlight this post!  
Unread 18-01-2015, 09:11
RufflesRidge RufflesRidge is offline
Registered User
no team
 
Join Date: Jan 2012
Location: USA
Posts: 989
RufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant future
Re: Having trouble getting started with Eclipse

Quote:
Originally Posted by mr_abomination View Post
Now we're getting the following errors:

Code:
Program "g++" not found in PATH
Program "gcc" not found in PATH
I'm not sure if the current documentation says it or not, but in Beta we were told you can safely ignore those.
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 12:48.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi