vps
January 11, 2015, 2:47pm
1
I’m having trouble calling my wrapper - it hasn’t happened before. Here’s the code that has been reduced to purely illustrate the problem.
//Atlas.h
#include "WPILib.h"
class Atlas: public SampleRobot {
Gyro* gyro; //just some filler here
public:
Atlas();
~Atlas();
void Autonomous();
void OperatorControl();
void Test();
};
//Atlas.cpp
#include "Atlas.h"
Atlas::Atlas() {
gyro = new Gyro(1);
}
Atlas::~Atlas() {
delete gyro;
}
void Atlas::Autonomous() { }
void Atlas::OperatorControl() { }
void Atlas::Test() { }
//initialize.cpp
#include "Atlas.h"
START_ROBOT_CLASS(Atlas); //error here
The error is:
Invalid arguments ’
Candidates are:
? HALReport(?, ?, ?, const char *)
’
help?
What happens if you try to deploy it? I believe that’s an error with the internal eclipse compiler, and your code will actually compile.
vps
January 11, 2015, 3:03pm
3
Note how the problem persists when everything is consolidated in one file:
//Atlas.cpp
#include "WPILib.h"
class Atlas: public SampleRobot {
Gyro* gyro; //just some filler here
public:
Atlas() {
gyro = new Gyro(1);
}
~Atlas() {
delete gyro;
}
void Autonomous() { };
void OperatorControl() { };
void Test() { };
};
START_ROBOT_CLASS(Atlas); //same error here
vps
January 11, 2015, 3:05pm
4
I have not tried to deploy this since it cannot even properly build. Right now, I’m at home so I cannot try that. Any other suggestions?
What I’m saying is that the internal eclipse builder thinks that’s an error, but it’s not. It should deploy properly when you connect to the roboRIO.
vps
January 11, 2015, 7:38pm
6
Thanks. I’ll try it out on Monday. Has this happened to you before?
E_Dawg
January 11, 2015, 8:32pm
7
We’ve experienced this issue multiple times. You should be fine if you compile. If it’s bugging you just delete the error from the console window and it should go away.
If you know you coded it right and its just the compiler saying you have an error, re-index it by right clicking on the project, scroll down to the index option and select rebuild. You’ll only have the standard gcc and etc errors.