Society of Robots - Robot Forum

Software => Software => Topic started by: teoxan on March 29, 2010, 04:45:21 PM

Title: Webbotlib problem with EZ1.h and GP2.h-multiple defs?
Post by: teoxan on March 29, 2010, 04:45:21 PM


I'm using the Axon2 with the Maxbotix EZ1 and everything works good.

But when i implement the GP2.h header to use a Sharp GP2D12 sensor together with the Maxbotix, I get

this error:

avr-gcc -I"C:\My_Robot\WebbotLib" -I"C:\My_Robot\WebbotLib\Sensors\Distance\Maxbotix" -I"C:\My_Robot\WebbotLib\Motors\DimensionEngineering" -I"C:\My_Robot\WebbotLib\Sensors\Distance\Sharp"  -mmcu=atmega640 -Wall -gdwarf-2 -std=gnu99                    -DF_
CPU=16000000UL -O0 -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -MD -MP -MT Servos.o -MF dep/Servos.o.d  -c  ../Servos.c

When I delete the Sharp header and all the code in my program to use it, everything gets back to normal!!

Is it possible to have a conflict here, since both the EZ1.h and the GP2.h use the same header a2d.h ?

If so, how am I suppose to use an EZ1 sensor together with a Sharp sensor in my robot?

Any ideas?

Thanks!

Theo

Title: Re: Webbotlib problem with EZ1.h and GP2.h-multiple defs?
Post by: chelmi on March 29, 2010, 06:47:11 PM
I don't see any error, just the call to avr-gcc

Chelmi.
Title: Re: Webbotlib problem with EZ1.h and GP2.h-multiple defs?
Post by: Webbot on March 29, 2010, 08:43:17 PM
Yep - agree. The error you see is......no error
Title: Re: Webbotlib problem with EZ1.h and GP2.h-multiple defs?
Post by: teoxan on March 30, 2010, 09:41:18 AM
Sorry,

That's the error:

Build started 30.3.2010 at 11:42:08
avr-gcc -I"C:\My_Robot\WebbotLib" -I"C:\My_Robot\WebbotLib\Sensors\Distance\Maxbotix" -I"C:\My_Robot\WebbotLib\Motors\DimensionEngineering" -I"C:\My_Robot\WebbotLib\Sensors\Distance\Sharp"  -mmcu=atmega640 -Wall -gdwarf-2 -std=gnu99                       
    -DF_CPU=16000000UL -O0 -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -MD -MP -MT Servos.o -MF dep/Servos.o.d  -c  ../Servos.c
avr-gcc -mmcu=atmega640 -Wl,-Map=Servos.map Servos.o   -L"C:\My_Robot\WebbotLib"  -lc -lm -lWebbot-ATMega640  -o Servos.elf
c:/winavr-20090313/bin/../lib/gcc/avr/4.3.2/../../../../avr/lib/avr5\libc.a(floatsisf.o): In function `__floatunsisf':
(.text.fplib+0x0): multiple definition of `__floatunsisf'
c:/winavr-20090313/bin/../lib/gcc/avr/4.3.2/avr5\libgcc.a(_usi_to_sf.o)(.text+0x0): first defined here
make: *** [Servos.elf] Error 1
Build failed with 1 errors and 0 warnings...

Any ideas?

Thanks!

theo

Title: Re: Webbotlib problem with EZ1.h and GP2.h-multiple defs?
Post by: Webbot on March 30, 2010, 01:30:13 PM
See http://www.societyofrobots.com/robotforum/index.php?topic=9487.0 (http://www.societyofrobots.com/robotforum/index.php?topic=9487.0)

You haven't specified the libraries in the correct order.