PSX example sketch

I am using ver 12 of the arduino software. I unzipped the psx files in the the proper location as listed on the playground.

http://www.arduino.cc/playground/Main/PSXLibrary

When I ran the example scetch I get these following errors.

In file included from C:\Documents and Settings\Administrator\Desktop\arduino\arduino-0012\hardware\cores\arduino/WProgram.h:4,


c:/documents and settings/administrator/desktop/arduino/arduino-0012/hardware/tools/avr/lib/gcc/../../avr/include/stdlib.h:80: error: expected unqualified-id before 'int'


c:/documents and settings/administrator/desktop/arduino/arduino-0012/hardware/tools/avr/lib/gcc/../../avr/include/stdlib.h:80: error: expected `)' before 'int'


c:/documents and settings/administrator/desktop/arduino/arduino-0012/hardware/tools/avr/lib/gcc/../../avr/include/stdlib.h:80: error: expected `)' before 'int'


c:/documents and settings/administrator/desktop/arduino/arduino-0012/hardware/tools/avr/lib/gcc/../../avr/include/stdlib.h:111: error: expected unqualified-id before 'int'


c:/documents and settings/administrator/desktop/arduino/arduino-0012/hardware/tools/avr/lib/gcc/../../avr/include/stdlib.h:111: error: expected `)' before 'int'


c:/documents and settings/administrator/desktop/arduino/arduino-0012/hardware/tools/avr/lib/gcc/../../avr/include/stdlib.h:111: error: expected `)' before 'int'


c:/documents and settings/administrator/desktop/arduino/arduino-0012/hardware/tools/avr/lib/gcc/../../avr/include/stdlib.h:144: error: expected identifier before '(' token


c:/documents and settings/administrator/desktop/arduino/arduino-0012/hardware/tools/avr/lib/gcc/../../avr/include/stdlib.h:144: error: expected `)' before '(' token


c:/documents and settings/administrator/desktop/arduino/arduino-0012/hardware/tools/avr/lib/gcc/../../avr/include/stdlib.h:144: error: expected ',' or '...' before '(' token


c:/documents and settings/administrator/desktop/arduino/arduino-0012/hardware/tools/avr/lib/gcc/../../avr/include/stdlib.h:144: error: expected initializer before ')' token


c:/documents and settings/administrator/desktop/arduino/arduino-0012/hardware/tools/avr/lib/gcc/../../avr/include/stdlib.h:176: error: '__compar_fn_t' has not been declared


In file included from C:\Documents and Settings\Administrator\Desktop\arduino\arduino-0012\hardware\cores\arduino/WProgram.h:6,

I am just starting to understand the arduino and the hardware/software aspect of it. But I am unable to figure out whats going wrong. The errors listed appear deep in the source so I thought I would ask for help.

Hmm.. Someone else made this same observation a few minutes ago. See this thread:
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1222985221

Mikal

I just verified that the same solution for the LedControl library applies to this library as well. See the other thread.

Mikal

If you find modifying system headers distasteful, I think adding the following lines AFTER the #include "Psx.h" should also resolve the problem:

#include "Psx.h"
#undef int
#undef abs
#undef double
#undef float
#undef round

Mikal

Ah, thanks for the help. I saw there were a couple similar posts about library problems with the ver 12. I switched to 11 and it worked. i'll go head and use 12 and make the adjustments. Thanks again.

Out of interest, did this work for you? The example compiled and loaded for me, but didn't seem to register any button presses. Wondering if anyone has got it up and running.