Arduino + Lego NXT

Hi,
in 2008 Marco Triverio developed ArduWay, a Segway type robot using Arduino to control NXT motors (the ones with the sensor).
I tried to use the project (Arduino2Lego - Browse /a2l/Sept 2008 at SourceForge.net) and build it in Arduino.
I made an 'arduino2lego' folder in the Sketchbook 'libraries' folder which holds 'a2lsymbols.h, arduino2lego.h and arduino2lego.cpp as well as an 'examples' folder with a subfolder 'Ardu_way_2_0_no_ricostr' with Ardu_way_2_0_no_ricostr.pde.
When I try to compile and verify I get the following error messages and stuck...

In file included from /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/WProgram.h:6,
from Ardu_way_2_0_no_ricostr.cpp:5:
/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/math.h:439: error: expected unqualified-id before 'double'
/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/math.h:439: error: expected )' before 'double' /Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/math.h:439: error: expected )' before 'double'

Could somebody be so nice and help a newbie to resolve this.

thanks a lot,
mike

I am really stuck. Even starting a new project with only the two include statements

#include <arduino2lego.h>
#include <a2lsymbols.h>

present the same error messages. For me this is a hard to track error message as it is generated from including a standard AVR lib (math.h).

mike

Never mind, I solved my problem...

It was a library issue.
The library header file included WConstants.h the library file (.cpp) included WProgram.h which both 'call-in' wiring.h -> error messages.
Commenting the include statement out for WConstants.h in the header file solved the issue.

Project compiles now w/o error messages.

So be aware, there's a problem with including libraries multiple times, probably the experienced programmers here know that, for a newbie like me it was a learning...

mike