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.

King Nerd III 03-02-2015 23:07

Re: Eclipse is being a butt
 
Quote:

Originally Posted by Alan Anderson (Post 1437998)
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.

Well I don't see how it differs. Installing from the download is downloading a zipped file and then dragging the folder into program files. How in the world is copying that folder to a jumpdrive and then to another computer any different?

King Nerd III 03-02-2015 23:11

Re: Eclipse is being a butt
 
Quote:

Originally Posted by JohnSmooth42 (Post 1437987)
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 :)

Windriver still gives me nightmares and makes me weep with sadness over having to use it. Eclipse is better, but it's still unstable and has some major problems. Visual Studio on the other hand just works. If you haven't tried it, I suggest you do! Link: http://www.visualstudio.com/en-us/ne...munity-vs.aspx

wireties 03-02-2015 23:25

Re: Eclipse is being a butt
 
Quote:

Originally Posted by King Nerd III (Post 1438026)
Windriver still gives me nightmares and makes me weep with sadness over having to use it. Eclipse is better, but it's still unstable and has some major problems. Visual Studio on the other hand just works. If you haven't tried it, I suggest you do! Link: http://www.visualstudio.com/en-us/ne...munity-vs.aspx

Wind River is a company, not a product. The operating system is "VxWorks" and were are now using much the same compiler. Wind River's "Workbench" is a customized version of Eclipse. Now were are using Eclipse but also modified by FIRST with some plug-ins.

Neither Wind River, FIRST, Eclipse or FSF had anything to do with mangling your headers. Someone probably accidentally deleted the method name - happens to everyone now and then.

Visual Studio is not (though it can be painfully modified) by default for cross development. Using Eclipse under Linux for cross development is the choice for many professionals. Personally I would not touch Visual Studio with a ten foot pole - every other version is way too buggy and I don't write PC apps.

King Nerd III 03-02-2015 23:44

Re: Eclipse is being a butt
 
Quote:

Originally Posted by wireties (Post 1438034)
Wind River is a company, not a product. The operating system is "VxWorks" and were are now using much the same compiler. Wind River's "Workbench" is a customized version of Eclipse. Now were are using Eclipse but also modified by FIRST with some plug-ins.

Neither Wind River, FIRST, Eclipse or FSF had anything to do with mangling your headers. Someone probably accidentally deleted the method name - happens to everyone now and then.

Visual Studio is not (though it can be painfully modified) by default for cross development. Using Eclipse under Linux for cross development is the choice for many professionals. Personally I would not touch Visual Studio with a ten foot pole - every other version is way too buggy and I don't write PC apps.

The very fact that eclipse doesn't clear out old errors and I have to manually delete them for my program to compile correctly raises many red flags for me. Visual Studio has worked perfectly for me, and I've never had as terrible of a problem as it throwing ghosts errors at me, like eclipse, for example the other day I had the line:
double speed = 0.5;
and got and error that said (not exact quote) "incompatible types, int to double"
My point is, Eclipse hasn't been stable at all for me, and I would rather have a tool I know works and trust (Visual Studio) than a tool that has not worked so far. I can't even import a project into a workspace, for crying out loud!

Alan Anderson 04-02-2015 00:24

Re: Eclipse is being a butt
 
Quote:

Originally Posted by King Nerd III (Post 1438020)
Well I don't see how it differs. Installing from the download is downloading a zipped file and then dragging the folder into program files. How in the world is copying that folder to a jumpdrive and then to another computer any different?

Running the C++ Toolchains installer isn't the same thing as unzipping a file. If you didn't do that, it might explain a lot of the problems you've been encountering.

King Nerd III 04-02-2015 00:28

Re: Eclipse is being a butt
 
Quote:

Originally Posted by Alan Anderson (Post 1437998)
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.

Tool chain was still installed like the tutorial says. I just said I copied over eclipse, because you can't download it over the school wifi. I am pretty sure I know how to correctly install eclipse, from a jumpdrive, as I have done it many times because of the amount of times I have had to remove it and reinstall it... so I am pretty sure the errors were not caused by not downloading a new copy everytime.

wireties 04-02-2015 01:05

Re: Eclipse is being a butt
 
Quote:

Originally Posted by King Nerd III (Post 1438043)
The very fact that eclipse doesn't clear out old errors and I have to manually delete them for my program to compile correctly raises many red flags for me. Visual Studio has worked perfectly for me, and I've never had as terrible of a problem as it throwing ghosts errors at me, like eclipse, for example the other day I had the line:
double speed = 0.5;
and got and error that said (not exact quote) "incompatible types, int to double"
My point is, Eclipse hasn't been stable at all for me, and I would rather have a tool I know works and trust (Visual Studio) than a tool that has not worked so far. I can't even import a project into a workspace, for crying out loud!

The errors are coming from the compiler, not from Eclipse. Eclipse is just an application framework. With respect, I think you need to read the manuals and more carefully follow the install instructions or you are never going to finish. This environment and cross development in general is more complex than simple VS projects. FYI - I import projects into Eclipse and export projects out of Eclipse every day. Many of the things you say are simply not the case. Our team has had 5 different students install and use Eclipse without problems and I'm developing under Linux. I'm not an Eclipse lover (hate the editor) but it is working as advertised.

King Nerd III 04-02-2015 09:49

Re: Eclipse is being a butt
 
Quote:

Originally Posted by wireties (Post 1438071)
The errors are coming from the compiler, not from Eclipse. Eclipse is just an application framework. With respect, I think you need to read the manuals and more carefully follow the install instructions or you are never going to finish. This environment and cross development in general is more complex than simple VS projects. FYI - I import projects into Eclipse and export projects out of Eclipse every day. Many of the things you say are simply not the case. Our team has had 5 different students install and use Eclipse without problems and I'm developing under Linux. I'm not an Eclipse lover (hate the editor) but it is working as advertised.

When ever either my mentor, my under-propgrammers, or I try to import a project it'll say import done, but there is no project in the project explorer! It's annoying as we have to then create a new project and replace all the files in it with our project files.

wireties 08-02-2015 19:04

Re: Eclipse is being a butt
 
Quote:

Originally Posted by King Nerd III (Post 1438127)
When ever either my mentor, my under-propgrammers, or I try to import a project it'll say import done, but there is no project in the project explorer! It's annoying as we have to then create a new project and replace all the files in it with our project files.

Export the project as an general->archive and import as an general->archive. That seems to work best for us.

King Nerd III 09-02-2015 09:43

Re: Eclipse is being a butt
 
Quote:

Originally Posted by wireties (Post 1440386)
Export the project as an general->archive and import as an general->archive. That seems to work best for us.

We'll try that. We're still having problems with Eclipse, so currently I've taken to writing everything in Visual Studio and then importing it into Eclipse to run on the robot. That's what's been working the best for us.

wireties 14-02-2015 07:56

Re: Eclipse is being a butt
 
I've seen your posts in several forums and there is a definite (and worrisome) theme. You are having troubles that few others experience (as in zero) and coming up with solutions that don't make much sense whilst disregarding advice from some very sharp engineers. Perhaps it is time to be honest with yourself and your team and get some help from a local mentor. We have 4 students (2 new to FRC) and myself using Eclipse/C++ and a custom software design and are having no problems. I can see your team getting to your first competition and failing miserably when running wireless hooked up to the field. And then it is too late - be humble, get some help while you still can.


All times are GMT -5. The time now is 13:11.

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