Software > Software

Webbotlib C++ compile error


I'm having some trouble compiling the C++ version of my project.
Not sure if it is a webbotlib error or my fault, but I'm able to get it to compile with no problem using C.

There are 2 specific errors but I'm not sure if they are related:
1. I can't get this line to compile

--- Code: ---static ACTUATOR_LIST PROGMEM body[] = {&RightAnkle.actuator, ...etc...};
--- End code ---
I get the compile error "class SERVO has no member named actuator"

Only way I can get it to work is to change the servo to change to:
--- Code: ---&_RightAnkle_.actuator
--- End code ---

2. when I include a file output from Gait Designer I get :
error: animations causes a section type conflict
error: frames_0 causes a section type conflict
... many other errors of the same type...

I have tried to reorder and re-factor but no success  :(

I tried with both compiler optimisation turned on and off but no luck there either.
The only way I have been able to get my project to compile is to use C and not C++.

Any suggestions?

Thanks guys.

kilms - got your PM but I'm rather up to my eyeballs at the moment!

Easiest may be to email me your project (if thats ok) - the more info the better. The 'section conflicts' are probably something to do with PROGMEM which is handled differently in C++ (for some unknown reason). Am sure its a Gait related issue....

am just wondering if this issue was resolved because am getting the same errors when trying to compile exported gaits into a standalone program for the avr.  The errors are the same, the exported file is pickup.h;

pickup.h:124: error: animations causes a section type conflict ... etc

line 124 is;
const PROGMEM G8_ANIMATION PROGMEM animations[2] = {

have tryed to keep all settings as the defaults, there are 2 animations, have tryed with just 1,
would really love to go further with these cool libraries but stuck at moment. any help appreciated.

You're specifying PROGMEM twice on that line. I don't think that's allowable.

Also, if G8_ANIMATION is defined to some particular kind of visibility control, that may be troublesome, too. Try to track down what the value of that is.


[0] Message Index

Go to full version