Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   C/C++ (http://www.chiefdelphi.com/forums/forumdisplay.php?f=183)
-   -   Eclipse is being a butt (http://www.chiefdelphi.com/forums/showthread.php?t=133903)

King Nerd III 03-02-2015 11:26

Eclipse is being a butt
 
Hello, it is I, Lord Supreme Programmer with Team 1410, and I am trying to write the code for the bot this year, but alas, I keep getting these errors while using CANTalon:

The type 'CANTalon' must implement the inherited pure virtual method 'CANSpeedController::ConfigPotentiometerTurns'

and so on. It says this for every CANTalon I write, and nothing seems to go away. The file still works and builds, but these errors are annoying. Does anyone know how to fix this?

ozrien 03-02-2015 14:49

Re: Eclipse is being a butt
 
Lord Supreme Programmer, try to rebuild in the index.
http://wpilib.screenstepslive.com/s/...p-test-program

King Nerd III 03-02-2015 14:54

Re: Eclipse is being a butt
 
Quote:

Originally Posted by ozrien (Post 1437740)
Lord Supreme Programmer, try to rebuild in the index.
http://wpilib.screenstepslive.com/s/...p-test-program

I have done that many, many times. It doesn't go away! Here is a list of what I have tried:
Rebuild project
clean and rebuild
rebuild index
un/reinstall libraries
un/reinstall toolchain
un/reinstall eclipse
rewritten entire project
restarted computer xMany times
I just can't fix it. My mentor had the same problem, but after a minute it disappeared

King Nerd III 03-02-2015 14:55

Re: Eclipse is being a butt
 
Quote:

Originally Posted by King Nerd III (Post 1437744)
I have done that many, many times. It doesn't go away! Here is a list of what I have tried:
Rebuild project
clean and rebuild
rebuild index
un/reinstall libraries
un/reinstall toolchain
un/reinstall eclipse
rewritten entire project
restarted computer xMany times
I just can't fix it. My mentor had the same problem, but after a minute it disappeared

Its just CANTalons and Victors. Talons work, which made me think its not the index.

ozrien 03-02-2015 15:36

Re: Eclipse is being a butt
 
That's a bummer usually re-indexing fixes it, but I still think it's syntax parser related only because you said the project still builds, and I know for a fact ConfigPotentiometerTurns is implemented (it's an empty implementation).

Just to sanity check (I'm sure you did this too) but maybe it might help another team having similar symptoms....

-navigate to the Problems tab and manually delete all the errors and warnings. You can highlight the treenodes in there and press delete or right-click-menu-delete. Eclipse will warn about deleting the error being permanent, hit ok.

Then in the project explorer, under binaries delete your FRCUserProgram. This step is necessary just for checking that the project does build.

Close all other open projects in eclipse except for the one you care about.

Clean the project. (takes a min, while you wait the build menu item will be gray)

Full build (or CNTRL+B), and let it finish.

Confirm FRCUserProgram is back (because it built ok).
Confirm if you still get the parser errors.

King Nerd III 03-02-2015 15:45

Re: Eclipse is being a butt
 
Quote:

Originally Posted by ozrien (Post 1437763)
That's a bummer usually re-indexing fixes it, but I still think it's syntax parser related only because you said the project still builds, and I know for a fact ConfigPotentiometerTurns is implemented (it's an empty implementation).

Just to sanity check (I'm sure you did this too) but maybe it might help another team having similar symptoms....

-navigate to the Problems tab and manually delete all the errors and warnings. You can highlight the treenodes in there and press delete or right-click-menu-delete. Eclipse will warn about deleting the error being permanent, hit ok.

Then in the project explorer, under binaries delete your FRCUserProgram. This step is necessary just for checking that the project does build.

Close all other open projects in eclipse except for the one you care about.

Clean the project. (takes a min, while you wait the build menu item will be gray)

Full build (or CNTRL+B), and let it finish.

Confirm FRCUserProgram is back (because it built ok).
Confirm if you still get the parser errors.

It got rid of those errors! but now a new one is there. It says expected unqualified-id before ')' in the CANTalon... Here's the line its referencing:
fl_motor = new CANTalon(1);
I think eclipse is just trying to make me go crazy.

Alan Anderson 03-02-2015 16:20

Re: Eclipse is being a butt
 
Quote:

Originally Posted by King Nerd III (Post 1437772)
It got rid of those errors! but now a new one is there. It says expected unqualified-id before ')' in the CANTalon... Here's the line its referencing:
fl_motor = new CANTalon(1);

Where is that line? What lines are surrounding it? Context is important. Compiler errors often show up on a line after the actual problem, as the parser tries and eventually fails to make sense of a minor typographic or syntactic error.

(I'm wondering what happened to the front_left_drive constant that used to be where the 1 is now, but that's not really important right now.)

Quote:

I think eclipse is just trying to make me go crazy.
I think rather that it's encouraging you to take things slowly and methodically, reading the documentation and following the directions carefully without skipping any steps. You are not yet experienced enough to recognize what certain results mean, and that's apparently leading you to try things without understanding why.

King Nerd III 03-02-2015 16:25

Re: Eclipse is being a butt
 
Quote:

Originally Posted by Alan Anderson (Post 1437795)
Where is that line? What lines are surrounding it? Context is important. Compiler errors often show up on a line after the actual problem, as the parser tries and eventually fails to make sense of a minor typographic or syntactic error.

(I'm wondering what happened to the front_left_drive constant that used to be where the 1 is now, but that's not really important right now.)



I think rather that it's encouraging you to take things slowly and methodically, reading the documentation and following the directions carefully without skipping any steps. You are not yet experienced enough to recognize what certain results mean, and that's apparently leading you to try things without understanding why.

I switched out the constant for an just a basic int typed into it to see if that made it go away, but it didn't.
I have that line in the subsystem DriveBase. Chief Delphi won't let me upload the file again, as I already have it here: http://www.chiefdelphi.com/forums/sh...6&postcount=15
but its the same file.

ozrien 03-02-2015 16:44

Re: Eclipse is being a butt
 
Yeah so one thing that's unique about eclipse is the error/warnings sometimes tend to stick around even after you resolve and rebuild. I'm guessing that was the first problem.

That new error sounds like a genuine compiler error, so that means the linker isn't able to create FRCUserProgram. Probably should confirm that though. That also means that you haven't actually been successfully building this whole time, which is good to know.

That line with the Talon c'tor error probably has been a problem this whole time and now it's revealing itself. Maybe make a simple project first and merge in your stuff in pieces until the error shows up to see what the cause is.

Alan's right, the problem is likely before that line, could be in one of the headers too.

King Nerd III 03-02-2015 16:51

Re: Eclipse is being a butt
 
Quote:

Originally Posted by ozrien (Post 1437808)
Yeah so one thing that's unique about eclipse is the error/warnings sometimes tend to stick around even after you resolve and rebuild. I'm guessing that was the first problem.

That new error sounds like a genuine compiler error, so that means the linker isn't able to create FRCUserProgram. Probably should confirm that though. That also means that you haven't actually been successfully building this whole time, which is good to know.

That line with the Talon c'tor error probably has been a problem this whole time and now it's revealing itself. Maybe make a simple project first and merge in your stuff in pieces until the error shows up to see what the cause is.

Alan's right, the problem is likely before that line, could be in one of the headers too.

Well I rewrote the line and the error went away for a few builds, but now its back, only this time it says the error is in CANTalon.h... the only problem with that is when I open up CANTalon.h there are no errors.

King Nerd III 03-02-2015 16:54

Re: Eclipse is being a butt
 
1 Attachment(s)
Quote:

Originally Posted by King Nerd III (Post 1437816)
Well I rewrote the line and the error went away for a few builds, but now its back, only this time it says the error is in CANTalon.h... the only problem with that is when I open up CANTalon.h there are no errors.

Update: I found the error. See attached image, anyone have a clue what the method is supposed to be named??

ozrien 03-02-2015 17:11

Re: Eclipse is being a butt
 
int GetNumberOfQuadIdxRises();
void SetNumberOfQuadIdxRises(int rises);
virtual bool GetForwardLimitOK() override;
virtual bool GetReverseLimitOK() override;
virtual uint16_t GetFaults() override;
uint16_t GetStickyFaults();
void ClearStickyFaults();

...maybe you bumped spacebar or something while navigating/viewing the headers?

King Nerd III 03-02-2015 17:20

Re: Eclipse is being a butt
 
Quote:

Originally Posted by ozrien (Post 1437836)
int GetNumberOfQuadIdxRises();
void SetNumberOfQuadIdxRises(int rises);
virtual bool GetForwardLimitOK() override;
virtual bool GetReverseLimitOK() override;
virtual uint16_t GetFaults() override;
uint16_t GetStickyFaults();
void ClearStickyFaults();

...maybe you bumped spacebar or something while navigating/viewing the headers?

This was the first time I had opened the header. I have no clue where it could have gone. Having that method name missing does explain a lot, though!
I just added it in and the program finally built without any errors, thanks for all the help. I will go and make sure that all my under-programmers fix that error, too, as they all copied their installation of Eclipse from me. Maybe finally all of our code will build perfectly.
I still stand by Eclipse isn't the best, and I still hold out hope that Microsoft will swoop in and save the day by helping to make Visual Studio available as a dev tool for FRC, but now that everything is working I'm content with Eclipse for now.

JohnSmooth42 03-02-2015 22:06

Re: Eclipse is being a butt
 
Quote:

Originally Posted by King Nerd III (Post 1437840)
I still stand by Eclipse isn't the best, and I still hold out hope that Microsoft will swoop in and save the day by helping to make Visual Studio available as a dev tool for FRC, but now that everything is working I'm content with Eclipse for now.

I don't understand why people say Eclipse is so bad, windriver was literally Eclipse with stickers. Everyone keeps saying Visual Studio is so great, which I don't understand either. I think I'll just stick with emacs and gcc :)

Alan Anderson 03-02-2015 22:23

Re: Eclipse is being a butt
 
Quote:

Originally Posted by King Nerd III (Post 1437840)
...they all copied their installation of Eclipse from me.

Do you mean they didn't actually "install" it on their computers, but just copied files from yours? I wouldn't be very confident in that working. You should always follow the directions in http://wpilib.screenstepslive.com/s/...eclipse-c-java when setting up a computer for C++ robot programming.


All times are GMT -5. The time now is 14:49.

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