Using Eclipse and AVR plug in.fails to create .elf file when including libraries

Hello

I setup eclipse for development for Atmega2560 using Arduino 1.0.6.

I was able to build the ArduinoCode library ok and also created a simple test program fine.

But when I attempt to compile our project the linker fails to produce the elf file.

All the library object files where build ok and the project file object was build ok. But when the linker is invoked it fails.

Any help is appreciated.

The linker stops with the following output:

'Building target: agotter.elf' 'Invoking: AVR C++ Linker' avr-g++ --cref -s -Os -o"agotter.elf" ./Wire/utility/twi.o ./Wire/Wire.o ./SdFat/utility/FatFile.o ./SdFat/utility/FatFileLFN.o ./SdFat/utility/FatFilePrint.o ./SdFat/utility/FatFileSFN.o ./SdFat/utility/FatVolume.o ./SdFat/utility/FmtNumber.o ./SdFat/utility/StdioStream.o ./SdFat/utility/fstream.o ./SdFat/utility/istream.o ./SdFat/utility/ostream.o ./SdFat/MinimumSerial.o ./SdFat/SdFatBase.o ./SdFat/SdFatUtil.o ./SdFat/SdSpiCard.o ./SdFat/SdSpiSAM3X.o ./SdFat/SdSpiSTM32F1.o ./SdFat/SdSpiTeensy3.o ./SPI/SPI.o ./MemoryFree-master/MemoryFree.o ./MPU6050/HMC5883L.o ./MPU6050/MPU6050.o ./I2Cdev/I2Cdev.o ./EEPROM/EEPROM.o ./DualVNH5019MotorShield/DualVNH5019MotorShield.o ./TinyGPS++.o ./agotter.o -lArduinoCore -lm -Wl,-Map,agotter.map,--cref -mrelax -Wl,--gc-sections -L"C:\Arduvino\ArduinoWS\ArduinoCore\Release" -mmcu=atmega2560 c:/program files (x86)/arduino/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/lib/avr6\libm.a(atan2.o): In function atan2': (.text.fplib+0x70): relocation truncated to fit: R_AVR_13_PCREL against symboladdsf3' defined in .text section in c:/program files (x86)/arduino/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/avr6\libgcc.a(_addsub_sf.o) c:/program files (x86)/arduino/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/lib/avr6\libm.a(fp_powsodd.o): In function `fp_powsodd': (.text.fplib+0x10): relocation truncated to fit: R_AVR_13_PCREL against symbol __mulsf3' defined in .text section in c:/program files (x86)/arduino/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/avr6\libgcc.a(_mul_sf.o) c:/program files (x86)/arduino/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/lib/avr6\libm.a(fp_powsodd.o): In functionfp_powsodd': (.text.fplib+0x20): relocation truncated to fit: R_AVR_13_PCREL against symbol `mulsf3' defined in .text section in c:/program files (x86)/arduino/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/avr6\libgcc.a(mul_sf.o) c:/program files (x86)/arduino/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/lib/avr6\libm.a(inverse.o): In function inverse': (.text.fplib+0xc): relocation truncated to fit: R_AVR_13_PCREL against symboldivsf3' defined in .text section in c:/program files (x86)/arduino/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/avr6\libgcc.a(_div_sf.o) c:/program files (x86)/arduino/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/lib/avr6\libm.a(square.o): In function square': (.text.fplib+0x4): relocation truncated to fit: R_AVR_13_PCREL against symbol_mulsf3' defined in .text section in c:/program files (x86)/arduino/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/avr6\libgcc.a(_mul_sf.o) make: *** [agotter.elf] Error 1

Try using avr-gcc as the linker an not avr-g++

It worked for me