"Build failed with 0 errors" problem!

Hello falks,
I am new to Arduino (coming from a PIC microChip background) and currently evaluating this platform for my different projects.

Most of the things are going well until I got this error:
Build Failed with 0 errors
and when looking at the errors & warnings output in the IDE i see
"undefined reference to 'SPI::SPI()' "

I am trying to compile the USB Host Shield library & program provided here.
(URL: w w w . circuitsathome.com/mcu/arduino-usb-host-part-2-classes)

Although it looks ok and everything should work fine, it is not. And i am all out of ideas, so if anyone has any feedback please lend me a hand.

Thanks
Fadi

Extra Info:
IDE: AVR Project IDE
Toolchain: WinAVR
OS: Win 7 Ultimate 64bit

The code compiler, but when the linker ran, it couldn't find the SPI constructor. Recently, the SPI class has gotten a makeover. While the file name wasn't changed, the actual class name within the file did change.

Have you tried compiling this code using the IDE? Which version? With what results?

Hi Paul,

Thanks for the quick reply.

I am aware of this change, as the class is named SPIClass rather than SPI. However it is clearly stated that the SPI to be used with the HOST SHIELD is from the playground or arduino 18 or earlier.
(i am using the playground SPI package)

I have not tried to use the Java based IDE provided by Arduino.cc because I am not sure how to specify the include directories...etc.

I can give it a shot but do you have any useful links on how to place the files (file/folder structure) as well as the Playground SPI to make it compile/link against it?

here is the build log from the AVR Project IDE:

Build Failed with 0 errors
Deleted: 'Max3421e.o', 'Usb.o', 'HardwareSerial.o', 'pins_arduino.o', 'Print.o', 'Tone.o', 'WInterrupts.o', 'wiring.o', 'wiring_analog.o', 'wiring_digital.o', 'wiring_pulse.o', 'wiring_shift.o', 'WMath.o', 'WString.o', 'SPI.o', 'arduino_temp_main.o', 'libDescriptorTest.a', 'Max3421e.d', 'Usb.d', 'HardwareSerial.d', 'pins_arduino.d', 'Print.d', 'Tone.d', 'WInterrupts.d', 'wiring.d', 'wiring_analog.d', 'wiring_digital.d', 'wiring_pulse.d', 'wiring_shift.d', 'WMath.d', 'WString.d', 'SPI.d', 'arduino_temp_main.d', 
Deleting: Max3421e.o Usb.o HardwareSerial.o pins_arduino.o Print.o Tone.o WInterrupts.o wiring.o wiring_analog.o wiring_digital.o wiring_pulse.o wiring_shift.o WMath.o WString.o SPI.o arduino_temp_main.o  libDescriptorTest.a Max3421e.d Usb.d HardwareSerial.d pins_arduino.d Print.d Tone.d WInterrupts.d wiring.d wiring_analog.d wiring_digital.d wiring_pulse.d wiring_shift.d WMath.d WString.d SPI.d arduino_temp_main.d  libDescriptorTest.a 
####Error: ELF file not created at C:\Users\MyUserName\Documents\Projects\DescriptorTest\output\DescriptorTest.elf
Execute: avr-gcc -mmcu=atmega328p -Wl,-Map=DescriptorTest.map -Wl,--gc-sections -Os libDescriptorTest.a Max3421e.o Usb.o HardwareSerial.o pins_arduino.o Print.o Tone.o WInterrupts.o wiring.o wiring_analog.o wiring_digital.o wiring_pulse.o wiring_shift.o WMath.o WString.o SPI.o arduino_temp_main.o   -lm -lc -o DescriptorTest.elf
Execute: avr-ar rcs libDescriptorTest.a Max3421e.o Usb.o HardwareSerial.o pins_arduino.o Print.o Tone.o WInterrupts.o wiring.o wiring_analog.o wiring_digital.o wiring_pulse.o wiring_shift.o WMath.o WString.o SPI.o 
cc1plus.exe: warning: command line option "-std=c99" is valid for C/ObjC but not for C++
Execute: avr-g++ -I"C:\Program Files (x86)\AVRProjectIDE\arduino\core" -I"C:\Program Files (x86)\AVRProjectIDE\arduino\libraries\SPI_Old" -I"C:\Users\MyUserName\Documents\Projects\DescriptorTest" -I"C:\Program Files (x86)\AVRProjectIDE\arduino\core" -I"C:\Users\MyUserName\AppData\Roaming\AVRProjectIDE\temp" -I"C:\Users\MyUserName\AppData\Roaming\AVRProjectIDE\temp"  -mmcu=atmega328p -DF_CPU=16000000UL -Os -fpack-struct -fshort-enums -funsigned-char -funsigned-bitfields -ffunction-sections -fdata-sections  -Wall -gdwarf-2 -MD -MP -MT arduino_temp_main.o  -c  -std=c99 "C:/Users/MyUserName/AppData/Roaming/AVRProjectIDE/temp/arduino_temp_main.cpp"
cc1plus.exe: warning: command line option "-std=c99" is valid for C/ObjC but not for C++
Execute: avr-g++ -I"C:\Program Files (x86)\AVRProjectIDE\arduino\core" -I"C:\Program Files (x86)\AVRProjectIDE\arduino\libraries\SPI_Old" -I"C:\Users\MyUserName\Documents\Projects\DescriptorTest" -I"C:\Program Files (x86)\AVRProjectIDE\arduino\core" -I"C:\Users\MyUserName\AppData\Roaming\AVRProjectIDE\temp" -I"C:\Users\MyUserName\AppData\Roaming\AVRProjectIDE\temp"  -mmcu=atmega328p -DF_CPU=16000000UL -Os -fpack-struct -fshort-enums -funsigned-char -funsigned-bitfields -ffunction-sections -fdata-sections  -Wall -gdwarf-2 -MD -MP -MT SPI.o  -c  -std=c99 "C:/Users/MyUserName/AppData/Roaming/AVRProjectIDE/temp/SPI.cpp"
cc1plus.exe: warning: command line option "-std=c99" is valid for C/ObjC but not for C++
Execute: avr-g++ -I"C:\Program Files (x86)\AVRProjectIDE\arduino\core" -I"C:\Program Files (x86)\AVRProjectIDE\arduino\libraries\SPI_Old" -I"C:\Users\MyUserName\Documents\Projects\DescriptorTest" -I"C:\Program Files (x86)\AVRProjectIDE\arduino\core" -I"C:\Users\MyUserName\AppData\Roaming\AVRProjectIDE\temp" -I"C:\Users\MyUserName\AppData\Roaming\AVRProjectIDE\temp"  -mmcu=atmega328p -DF_CPU=16000000UL -Os -fpack-struct -fshort-enums -funsigned-char -funsigned-bitfields -ffunction-sections -fdata-sections  -Wall -gdwarf-2 -MD -MP -MT WString.o  -c  -std=c99 "C:/Users/MyUserName/AppData/Roaming/AVRProjectIDE/temp/WString.cpp"
cc1plus.exe: warning: command line option "-std=c99" is valid for C/ObjC but not for C++
Execute: avr-g++ -I"C:\Program Files (x86)\AVRProjectIDE\arduino\core" -I"C:\Program Files (x86)\AVRProjectIDE\arduino\libraries\SPI_Old" -I"C:\Users\MyUserName\Documents\Projects\DescriptorTest" -I"C:\Program Files (x86)\AVRProjectIDE\arduino\core" -I"C:\Users\MyUserName\AppData\Roaming\AVRProjectIDE\temp" -I"C:\Users\MyUserName\AppData\Roaming\AVRProjectIDE\temp"  -mmcu=atmega328p -DF_CPU=16000000UL -Os -fpack-struct -fshort-enums -funsigned-char -funsigned-bitfields -ffunction-sections -fdata-sections  -Wall -gdwarf-2 -MD -MP -MT WMath.o  -c  -std=c99 "C:/Users/MyUserName/AppData/Roaming/AVRProjectIDE/temp/WMath.cpp"
Execute: avr-gcc -I"C:\Program Files (x86)\AVRProjectIDE\arduino\core" -I"C:\Program Files (x86)\AVRProjectIDE\arduino\libraries\SPI_Old" -I"C:\Users\MyUserName\Documents\Projects\DescriptorTest" -I"C:\Program Files (x86)\AVRProjectIDE\arduino\core" -I"C:\Users\MyUserName\AppData\Roaming\AVRProjectIDE\temp" -I"C:\Users\MyUserName\AppData\Roaming\AVRProjectIDE\temp"  -mmcu=atmega328p -DF_CPU=16000000UL -Os -fpack-struct -fshort-enums -funsigned-char -funsigned-bitfields -ffunction-sections -fdata-sections  -Wall -gdwarf-2 -MD -MP -MT wiring_shift.o  -c  -std=gnu99 "C:/Users/MyUserName/AppData/Roaming/AVRProjectIDE/temp/wiring_shift.c"
Execute: avr-gcc -I"C:\Program Files (x86)\AVRProjectIDE\arduino\core" -I"C:\Program Files (x86)\AVRProjectIDE\arduino\libraries\SPI_Old" -I"C:\Users\MyUserName\Documents\Projects\DescriptorTest" -I"C:\Program Files (x86)\AVRProjectIDE\arduino\core" -I"C:\Users\MyUserName\AppData\Roaming\AVRProjectIDE\temp" -I"C:\Users\MyUserName\AppData\Roaming\AVRProjectIDE\temp"  -mmcu=atmega328p -DF_CPU=16000000UL -Os -fpack-struct -fshort-enums -funsigned-char -funsigned-bitfields -ffunction-sections -fdata-sections  -Wall -gdwarf-2 -MD -MP -MT wiring_pulse.o  -c  -std=gnu99 "C:/Users/MyUserName/AppData/Roaming/AVRProjectIDE/temp/wiring_pulse.c"
Execute: avr-gcc -I"C:\Program Files (x86)\AVRProjectIDE\arduino\core" -I"C:\Program Files (x86)\AVRProjectIDE\arduino\libraries\SPI_Old" -I"C:\Users\MyUserName\Documents\Projects\DescriptorTest" -I"C:\Program Files (x86)\AVRProjectIDE\arduino\core" -I"C:\Users\MyUserName\AppData\Roaming\AVRProjectIDE\temp" -I"C:\Users\MyUserName\AppData\Roaming\AVRProjectIDE\temp"  -mmcu=atmega328p -DF_CPU=16000000UL -Os -fpack-struct -fshort-enums -funsigned-char -funsigned-bitfields -ffunction-sections -fdata-sections  -Wall -gdwarf-2 -MD -MP -MT wiring_digital.o  -c  -std=gnu99 "C:/Users/MyUserName/AppData/Roaming/AVRProjectIDE/temp/wiring_digital.c"
Execute: avr-gcc -I"C:\Program Files (x86)\AVRProjectIDE\arduino\core" -I"C:\Program Files (x86)\AVRProjectIDE\arduino\libraries\SPI_Old" -I"C:\Users\MyUserName\Documents\Projects\DescriptorTest" -I"C:\Program Files (x86)\AVRProjectIDE\arduino\core" -I"C:\Users\MyUserName\AppData\Roaming\AVRProjectIDE\temp" -I"C:\Users\MyUserName\AppData\Roaming\AVRProjectIDE\temp"  -mmcu=atmega328p -DF_CPU=16000000UL -Os -fpack-struct -fshort-enums -funsigned-char -funsigned-bitfields -ffunction-sections -fdata-sections  -Wall -gdwarf-2 -MD -MP -MT wiring_analog.o  -c  -std=gnu99 "C:/Users/MyUserName/AppData/Roaming/AVRProjectIDE/temp/wiring_analog.c"
Execute: avr-gcc -I"C:\Program Files (x86)\AVRProjectIDE\arduino\core" -I"C:\Program Files (x86)\AVRProjectIDE\arduino\libraries\SPI_Old" -I"C:\Users\MyUserName\Documents\Projects\DescriptorTest" -I"C:\Program Files (x86)\AVRProjectIDE\arduino\core" -I"C:\Users\MyUserName\AppData\Roaming\AVRProjectIDE\temp" -I"C:\Users\MyUserName\AppData\Roaming\AVRProjectIDE\temp"  -mmcu=atmega328p -DF_CPU=16000000UL -Os -fpack-struct -fshort-enums -funsigned-char -funsigned-bitfields -ffunction-sections -fdata-sections  -Wall -gdwarf-2 -MD -MP -MT wiring.o  -c  -std=gnu99 "C:/Users/MyUserName/AppData/Roaming/AVRProjectIDE/temp/wiring.c"
Execute: avr-gcc -I"C:\Program Files (x86)\AVRProjectIDE\arduino\core" -I"C:\Program Files (x86)\AVRProjectIDE\arduino\libraries\SPI_Old" -I"C:\Users\MyUserName\Documents\Projects\DescriptorTest" -I"C:\Program Files (x86)\AVRProjectIDE\arduino\core" -I"C:\Users\MyUserName\AppData\Roaming\AVRProjectIDE\temp" -I"C:\Users\MyUserName\AppData\Roaming\AVRProjectIDE\temp"  -mmcu=atmega328p -DF_CPU=16000000UL -Os -fpack-struct -fshort-enums -funsigned-char -funsigned-bitfields -ffunction-sections -fdata-sections  -Wall -gdwarf-2 -MD -MP -MT WInterrupts.o  -c  -std=gnu99 "C:/Users/MyUserName/AppData/Roaming/AVRProjectIDE/temp/WInterrupts.c"
cc1plus.exe: warning: command line option "-std=c99" is valid for C/ObjC but not for C++

continuation of the log due to max characters limit:

Execute: avr-g++ -I"C:\Program Files (x86)\AVRProjectIDE\arduino\core" -I"C:\Program Files (x86)\AVRProjectIDE\arduino\libraries\SPI_Old" -I"C:\Users\MyUserName\Documents\Projects\DescriptorTest" -I"C:\Program Files (x86)\AVRProjectIDE\arduino\core" -I"C:\Users\MyUserName\AppData\Roaming\AVRProjectIDE\temp" -I"C:\Users\MyUserName\AppData\Roaming\AVRProjectIDE\temp"  -mmcu=atmega328p -DF_CPU=16000000UL -Os -fpack-struct -fshort-enums -funsigned-char -funsigned-bitfields -ffunction-sections -fdata-sections  -Wall -gdwarf-2 -MD -MP -MT Tone.o  -c  -std=c99 "C:/Users/MyUserName/AppData/Roaming/AVRProjectIDE/temp/Tone.cpp"
cc1plus.exe: warning: command line option "-std=c99" is valid for C/ObjC but not for C++
Execute: avr-g++ -I"C:\Program Files (x86)\AVRProjectIDE\arduino\core" -I"C:\Program Files (x86)\AVRProjectIDE\arduino\libraries\SPI_Old" -I"C:\Users\MyUserName\Documents\Projects\DescriptorTest" -I"C:\Program Files (x86)\AVRProjectIDE\arduino\core" -I"C:\Users\MyUserName\AppData\Roaming\AVRProjectIDE\temp" -I"C:\Users\MyUserName\AppData\Roaming\AVRProjectIDE\temp"  -mmcu=atmega328p -DF_CPU=16000000UL -Os -fpack-struct -fshort-enums -funsigned-char -funsigned-bitfields -ffunction-sections -fdata-sections  -Wall -gdwarf-2 -MD -MP -MT Print.o  -c  -std=c99 "C:/Users/MyUserName/AppData/Roaming/AVRProjectIDE/temp/Print.cpp"
Execute: avr-gcc -I"C:\Program Files (x86)\AVRProjectIDE\arduino\core" -I"C:\Program Files (x86)\AVRProjectIDE\arduino\libraries\SPI_Old" -I"C:\Users\MyUserName\Documents\Projects\DescriptorTest" -I"C:\Program Files (x86)\AVRProjectIDE\arduino\core" -I"C:\Users\MyUserName\AppData\Roaming\AVRProjectIDE\temp" -I"C:\Users\MyUserName\AppData\Roaming\AVRProjectIDE\temp"  -mmcu=atmega328p -DF_CPU=16000000UL -Os -fpack-struct -fshort-enums -funsigned-char -funsigned-bitfields -ffunction-sections -fdata-sections  -Wall -gdwarf-2 -MD -MP -MT pins_arduino.o  -c  -std=gnu99 "C:/Users/MyUserName/AppData/Roaming/AVRProjectIDE/temp/pins_arduino.c"
cc1plus.exe: warning: command line option "-std=c99" is valid for C/ObjC but not for C++
Execute: avr-g++ -I"C:\Program Files (x86)\AVRProjectIDE\arduino\core" -I"C:\Program Files (x86)\AVRProjectIDE\arduino\libraries\SPI_Old" -I"C:\Users\MyUserName\Documents\Projects\DescriptorTest" -I"C:\Program Files (x86)\AVRProjectIDE\arduino\core" -I"C:\Users\MyUserName\AppData\Roaming\AVRProjectIDE\temp" -I"C:\Users\MyUserName\AppData\Roaming\AVRProjectIDE\temp"  -mmcu=atmega328p -DF_CPU=16000000UL -Os -fpack-struct -fshort-enums -funsigned-char -funsigned-bitfields -ffunction-sections -fdata-sections  -Wall -gdwarf-2 -MD -MP -MT HardwareSerial.o  -c  -std=c99 "C:/Users/MyUserName/AppData/Roaming/AVRProjectIDE/temp/HardwareSerial.cpp"
cc1plus.exe: warning: command line option "-std=c99" is valid for C/ObjC but not for C++
Execute: avr-g++ -I"C:\Program Files (x86)\AVRProjectIDE\arduino\core" -I"C:\Program Files (x86)\AVRProjectIDE\arduino\libraries\SPI_Old" -I"C:\Users\MyUserName\Documents\Projects\DescriptorTest" -I"C:\Users\MyUserName\Documents\Projects\DescriptorTest"  -mmcu=atmega328p -DF_CPU=16000000UL -Os -fpack-struct -fshort-enums -funsigned-char -funsigned-bitfields -ffunction-sections -fdata-sections  -Wall -gdwarf-2 -MD -MP -MT Usb.o  -c  -std=c99 "C:/Users/MyUserName/Documents/Projects/DescriptorTest/Usb.cpp"
cc1plus.exe: warning: command line option "-std=c99" is valid for C/ObjC but not for C++
Execute: avr-g++ -I"C:\Program Files (x86)\AVRProjectIDE\arduino\core" -I"C:\Program Files (x86)\AVRProjectIDE\arduino\libraries\SPI_Old" -I"C:\Users\MyUserName\Documents\Projects\DescriptorTest" -I"C:\Users\MyUserName\Documents\Projects\DescriptorTest"  -mmcu=atmega328p -DF_CPU=16000000UL -Os -fpack-struct -fshort-enums -funsigned-char -funsigned-bitfields -ffunction-sections -fdata-sections  -Wall -gdwarf-2 -MD -MP -MT Max3421e.o  -c  -std=c99 "C:/Users/MyUserName/Documents/Projects/DescriptorTest/Max3421e.cpp"

Thanks for all the help

Hmmm strange!

I was able to compile successfuly using the IDE provided by arduino.cc!

I had to (remove the SPI folder from the libraries folder)
and copy all .H and .CPP files of the USB Host shield as well as the SPI from playground to the Hardware->arduino->core... where all the includes are.

it compiled!!

so any idea what could be werong with the AVR Program IDE ?