You can't include a contributed library in a .cpp file without including a/any contributed library in the main .ino/.pde file!
I made simple tests by saving Blink into a regular sketch (not example any more) and adding a test.cpp tab to the file. I then added #include <phi_interfaces.h> in test.cpp but not in Blink.ino so this happens:
C:\Users\Liu\Downloads\arduino-1.0\hardware\tools\avr\bin\avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega1280 -DF_CPU=16000000L -DARDUINO=100 -IC:\Users\Liu\Downloads\arduino-1.0\hardware\arduino\cores\arduino -IC:\Users\Liu\Downloads\arduino-1.0\hardware\arduino\variants\mega C:\Users\Liu\AppData\Local\Temp\build4240670370917479535.tmp\Blink.cpp -oC:\Users\Liu\AppData\Local\Temp\build4240670370917479535.tmp\Blink.cpp.o
C:\Users\Liu\Downloads\arduino-1.0\hardware\tools\avr\bin\avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega1280 -DF_CPU=16000000L -DARDUINO=100 -IC:\Users\Liu\Downloads\arduino-1.0\hardware\arduino\cores\arduino -IC:\Users\Liu\Downloads\arduino-1.0\hardware\arduino\variants\mega C:\Users\Liu\AppData\Local\Temp\build4240670370917479535.tmp\test.cpp -oC:\Users\Liu\AppData\Local\Temp\build4240670370917479535.tmp\test.cpp.o
test.cpp:1:28: error: phi_interfaces.h: No such file or directory
Of course, the IDE failed to have this option on test.cpp!
-IC:\Users\Liu\Documents\arduino sketchbooks\libraries\phi_interfaces
I then proceeded to add #include <phi_interfaces.h> in Blink.ino and this happens:
C:\Users\Liu\Downloads\arduino-1.0\hardware\tools\avr\bin\avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega1280 -DF_CPU=16000000L -DARDUINO=100 -IC:\Users\Liu\Downloads\arduino-1.0\hardware\arduino\cores\arduino -IC:\Users\Liu\Downloads\arduino-1.0\hardware\arduino\variants\mega -IC:\Users\Liu\Documents\arduino sketchbooks\libraries\phi_interfaces C:\Users\Liu\AppData\Local\Temp\build4240670370917479535.tmp\Blink.cpp -oC:\Users\Liu\AppData\Local\Temp\build4240670370917479535.tmp\Blink.cpp.o
C:\Users\Liu\Downloads\arduino-1.0\hardware\tools\avr\bin\avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega1280 -DF_CPU=16000000L -DARDUINO=100 -IC:\Users\Liu\Downloads\arduino-1.0\hardware\arduino\cores\arduino -IC:\Users\Liu\Downloads\arduino-1.0\hardware\arduino\variants\mega -IC:\Users\Liu\Documents\arduino sketchbooks\libraries\phi_interfaces C:\Users\Liu\AppData\Local\Temp\build4240670370917479535.tmp\test.cpp -oC:\Users\Liu\AppData\Local\Temp\build4240670370917479535.tmp\test.cpp.o
Notice the difference in the library locations included? If I didn't include that contributed library in Blink.ino the IDE fails to see the need for this contributed library location in any .cpp files. If I do include the contributed library in Blink.ino, the IDE slaps the contributed library location to all file being compiled. This is lousy at best.
Arduino team, read this and made the change!