Author Topic: Webbotlib C++ compile error  (Read 1940 times)

0 Members and 1 Guest are viewing this topic.

Offline klimsTopic starter

  • Robot Overlord
  • ****
  • Posts: 190
  • Helpful? 2
Webbotlib C++ compile error
« on: June 07, 2012, 03:27:31 AM »
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: [Select]
static ACTUATOR_LIST PROGMEM body[] = {&RightAnkle.actuator, ...etc...};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: [Select]

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.

Offline Webbot

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,165
  • Helpful? 111
Re: Webbotlib C++ compile error
« Reply #1 on: June 07, 2012, 11:36:18 AM »
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....
Webbot Home:
WebbotLib online docs:
If your in the neighbourhood:

Offline RifRaf

  • Jr. Member
  • **
  • Posts: 10
  • Helpful? 0
Re: Webbotlib C++ compile error
« Reply #2 on: February 04, 2013, 03:33:32 AM »
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.

Offline jwatte

  • Supreme Robot
  • *****
  • Posts: 1,345
  • Helpful? 82
Re: Webbotlib C++ compile error
« Reply #3 on: February 04, 2013, 11:09:33 AM »
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.


Get Your Ad Here