Go to Post "Why do it the easy way when you can do it the hard way?:rolleyes:" - EricH [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 Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 31-10-2016, 11:28
RyZeRun RyZeRun is offline
Registered User
FRC #4104
 
Join Date: Oct 2016
Location: Spokane, WA
Posts: 4
RyZeRun is an unknown quantity at this point
"Getting Started" Errors

I created a WPILib example file, "Getting Started". This is my code:

Code:
#include "WPILib.h"

class Robot: public IterativeRobot
{

	RobotDrive myRobot; // robot drive system
	Joystick stick; // only joystick
	LiveWindow *lw;
	int autoLoopCounter;

public:
	Robot() :
		myRobot(0, 1),	// these must be initialized in the same order
		stick(0),		// as they are declared above.
		lw(LiveWindow::GetInstance()),
		autoLoopCounter(0)
	{
		myRobot.SetExpiration(0.1);
	}

private:
	void AutonomousInit()
	{
		autoLoopCounter = 0;
	}

	void AutonomousPeriodic()
	{
		if(autoLoopCounter < 100) //Check if we've completed 100 loops (approximately 2 seconds)
		{
			myRobot.Drive(-0.5, 0.0); 	// drive forwards half speed
			autoLoopCounter++;
			} else {
			myRobot.Drive(0.0, 0.0); 	// stop robot
		}
	}

	void TeleopInit()
	{

	}

	void TeleopPeriodic()
	{
		myRobot.ArcadeDrive(stick); // drive with arcade style (use right stick)
	}

	void TestPeriodic()
	{
		lw->Run();
	}
};

START_ROBOT_CLASS(Robot)
I get five errors:

- Program "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\amd64\cl" not found in PATH

- The type 'Joystick' must implement the inherited pure virtual method 'GenericHID::GetPOV' In line 7

- The type 'Joystick' must implement the inherited pure virtual method 'GenericHID::GetRawAxis' In line 7

- The type 'Joystick' must implement the inherited pure virtual method 'GenericHID::GetRawButton' In line 7

- The type 'RobotDrive' must implement the inherited pure virtual method 'MotorSafety::GetDescription' In line 6

Also, 'START_ROBOT_CLASS(Robot)' has a syntax error.

How can I fix these errors?
Reply With Quote
  #2   Spotlight this post!  
Unread 31-10-2016, 13:07
mdballard's Avatar
mdballard mdballard is offline
SW and Control Systems Mentor
AKA: Matthew Ballard
FRC #4329 (Lutheran Roboteers)
Team Role: Mentor
 
Join Date: Aug 2014
Rookie Year: 2014
Location: Missouri
Posts: 5
mdballard is an unknown quantity at this point
Re: "Getting Started" Errors

Hi,

Hopefully this will help:
1) "Program "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\amd64\cl" not found in PATH"
This indicates that the development environment is probably not setup. If you are going to use Visual Studio you may wish to look at this thread: https://www.chiefdelphi.com/forums/s...=visual+studio

If you are just starting out with C++, I would recommend starting with the setup instructions described here: https://wpilib.screenstepslive.com/s.../13810/c/57252

My guess is that the rest of the errors you are seeing are related to include paths that need to be set for the WPILIB include directories.

I'm at my day job right now, but I can add more detail when I get home this evening. Hopefully the information I gave you above can help get you started.

Matt
Reply With Quote
  #3   Spotlight this post!  
Unread 01-11-2016, 18:30
RyZeRun RyZeRun is offline
Registered User
FRC #4104
 
Join Date: Oct 2016
Location: Spokane, WA
Posts: 4
RyZeRun is an unknown quantity at this point
Re: "Getting Started" Errors

Quote:
Originally Posted by mdballard View Post
Hi,

Hopefully this will help:
1) "Program "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\amd64\cl" not found in PATH"
This indicates that the development environment is probably not setup. If you are going to use Visual Studio you may wish to look at this thread: https://www.chiefdelphi.com/forums/s...=visual+studio

If you are just starting out with C++, I would recommend starting with the setup instructions described here: https://wpilib.screenstepslive.com/s.../13810/c/57252

My guess is that the rest of the errors you are seeing are related to include paths that need to be set for the WPILIB include directories.

I'm at my day job right now, but I can add more detail when I get home this evening. Hopefully the information I gave you above can help get you started.

Matt
I'm using Eclipse Mars 2, and have installed the toolchain, plugins, etc. Everything's all set up. I double-checked the C++ setup.
Reply With Quote
  #4   Spotlight this post!  
Unread 01-11-2016, 19:06
euhlmann's Avatar
euhlmann euhlmann is offline
CTO, Programmer
AKA: Erik Uhlmann
FRC #2877 (LigerBots)
Team Role: Leadership
 
Join Date: Dec 2015
Rookie Year: 2015
Location: United States
Posts: 296
euhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud of
Re: "Getting Started" Errors

Try closing Eclipse, deleting C:\Users\<You>\wpilib, then starting Eclipse again (wait for it to recreate the folder)
__________________
Creator of SmartDashboard.js, an extensible nodejs/webkit replacement for SmartDashboard


https://ligerbots.org
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 10:02.

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