Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Problem calling START_ROBOT_CLASS(_CLASSNAME_) Wrapper (http://www.chiefdelphi.com/forums/showthread.php?t=132644)

vps 11-01-2015 14:47

Problem calling START_ROBOT_CLASS(_CLASSNAME_) Wrapper
 
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.


Code:

//Atlas.h
#include "WPILib.h"

class Atlas: public SampleRobot {
        Gyro* gyro;                                //just some filler here
public:
        Atlas();
        ~Atlas();
        void Autonomous();
        void OperatorControl();
        void Test();
};

Code:

//Atlas.cpp
#include "Atlas.h"

Atlas::Atlas() {
        gyro = new Gyro(1);
}
Atlas::~Atlas() {
        delete gyro;
}

void Atlas::Autonomous() { }
void Atlas::OperatorControl() { }
void Atlas::Test() { }

Code:

//initialize.cpp
#include "Atlas.h"
START_ROBOT_CLASS(Atlas);    //error here

The error is:
Quote:

Invalid arguments '
Candidates are:
? HALReport(?, ?, ?, const char *)
'

help?

fsilberberg 11-01-2015 15:02

Re: Problem calling START_ROBOT_CLASS(_CLASSNAME_) Wrapper
 
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 11-01-2015 15:03

Re: Problem calling START_ROBOT_CLASS(_CLASSNAME_) Wrapper
 
Note how the problem persists when everything is consolidated in one file:

Code:

//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 11-01-2015 15:05

Re: Problem calling START_ROBOT_CLASS(_CLASSNAME_) Wrapper
 
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?

fsilberberg 11-01-2015 15:20

Re: Problem calling START_ROBOT_CLASS(_CLASSNAME_) Wrapper
 
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 11-01-2015 19:38

Re: Problem calling START_ROBOT_CLASS(_CLASSNAME_) Wrapper
 
Quote:

Originally Posted by fsilberberg (Post 1426305)
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.

Thanks. I'll try it out on Monday. Has this happened to you before?

E Dawg 11-01-2015 20:32

Re: Problem calling START_ROBOT_CLASS(_CLASSNAME_) Wrapper
 
Quote:

Originally Posted by vps (Post 1426430)
Thanks. I'll try it out on Monday. Has this happened to you before?

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.

mega900997 11-01-2015 20:40

Re: Problem calling START_ROBOT_CLASS(_CLASSNAME_) Wrapper
 
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.

catacon 11-01-2015 22:50

Re: Problem calling START_ROBOT_CLASS(_CLASSNAME_) Wrapper
 
Quote:

Originally Posted by mega900997 (Post 1426460)
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.

x2


All times are GMT -5. The time now is 02:39.

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