I've been starting to work on my robot control software using WebbotLib, but am having some difficulties getting some code to compile. This problem may or may not relate directly to Webbot, since the error may not be generated by a problem in the library. I'm using v1.10 of Webbot.
#include "sys/axon.h" // The Society of Robots Axon Microcontroller
#include "Sensors\Distance\Ping\PingSonar.h"
#include "Sensors\Distance\Sharp\GP2D12.h"
// Now include any other files that are needed here
#include "uart.h"
#include "rprintf.h"
#include "walter-webbot.h"
// My functions, definitions, and procedures
PingSonar ping[8] = { MAKE_PingSonar(F0),
MAKE_PingSonar(F1),
MAKE_PingSonar(F2),
MAKE_PingSonar(F3),
MAKE_PingSonar(F4),
MAKE_PingSonar(F5),
MAKE_PingSonar(F6),
MAKE_PingSonar(F7)
};
// A test
typedef struct servo_def {
unsigned int position;
int pulse;
} SERVO;
SERVO servo[32];
Sharp_GP2D12 ir[8] = { MAKE_Sharp_GP2D12(K0),
MAKE_Sharp_GP2D12(K1),
MAKE_Sharp_GP2D12(K2),
MAKE_Sharp_GP2D12(K3),
MAKE_Sharp_GP2D12(K4),
MAKE_Sharp_GP2D12(K5),
MAKE_Sharp_GP2D12(K6),
MAKE_Sharp_GP2D12(K7)
};
I am getting the following error on compile:
e:/devel/winavr/bin/../lib/gcc/avr/4.3.2/../../../../avr/lib/avr5\libc.a(floatsisf.o): In function `__floatunsisf':
(.text.fplib+0x0): multiple definition of `__floatunsisf'
e:/devel/winavr/bin/../lib/gcc/avr/4.3.2/avr5\libgcc.a(_usi_to_sf.o)
.text+0x0): first defined here
make: *** [walter.elf] Error 1
Build failed with 1 errors and 0 warnings...
This error seems to have something to do with the declaration of the Sharp GP2D12 sensor array I have. The PING sensor declaration compiles perfectly and works. If I remove the Sharp declaration, everything compiles perfectly. Is there a solution for this problem?
8-Dale