Go Down

Topic: Please help-Issues with using library *RESOLVED* (Read 357 times) previous topic - next topic

Jan 22, 2013, 02:01 am Last Edit: Jan 22, 2013, 02:13 am by helpplease Reason: 1
I'm using an Arduino Mega 2560. I'm on 64-bit Windows 7 trying to use a third party library (NESpad) to receive input from an NES controller. Attempting to compile any program with #include <NESpad.h> yields this error:

C:\Users\Radverbial\arduino-1.0.3\libraries\NESpad\NESpad.cpp:26:22: error: WProgram.h: No such file or directory
C:\Users\Radverbial\arduino-1.0.3\libraries\NESpad\NESpad.cpp: In constructor 'NESpad::NESpad(int, int, int)':
C:\Users\Radverbial\arduino-1.0.3\libraries\NESpad\NESpad.cpp:46: error: 'OUTPUT' was not declared in this scope
C:\Users\Radverbial\arduino-1.0.3\libraries\NESpad\NESpad.cpp:46: error: 'pinMode' was not declared in this scope
C:\Users\Radverbial\arduino-1.0.3\libraries\NESpad\NESpad.cpp:48: error: 'INPUT' was not declared in this scope
C:\Users\Radverbial\arduino-1.0.3\libraries\NESpad\NESpad.cpp: At global scope:
C:\Users\Radverbial\arduino-1.0.3\libraries\NESpad\NESpad.cpp:51: error: 'byte' does not name a type
C:\Users\Radverbial\arduino-1.0.3\libraries\NESpad\NESpad.cpp: In member function 'void NESpad::strobe()':
C:\Users\Radverbial\arduino-1.0.3\libraries\NESpad\NESpad.cpp:64: error: 'HIGH' was not declared in this scope
C:\Users\Radverbial\arduino-1.0.3\libraries\NESpad\NESpad.cpp:64: error: 'digitalWrite' was not declared in this scope
C:\Users\Radverbial\arduino-1.0.3\libraries\NESpad\NESpad.cpp:65: error: 'delayMicroseconds' was not declared in this scope
C:\Users\Radverbial\arduino-1.0.3\libraries\NESpad\NESpad.cpp:66: error: 'LOW' was not declared in this scope
C:\Users\Radverbial\arduino-1.0.3\libraries\NESpad\NESpad.cpp: At global scope:
C:\Users\Radverbial\arduino-1.0.3\libraries\NESpad\NESpad.cpp:69: error: 'byte' does not name a type

patduino

It looks like the library is looking for another library: WProgram

Or a file with that name: WProgram.h

Do you see it anywhere?
There are 10 types of people in the world, those that understand binary, and those that don't.

#2
Jan 22, 2013, 02:08 am Last Edit: Jan 22, 2013, 02:13 am by helpplease Reason: 1
Quote
2. Version 1.0 of the IDE*

A few things were changed in the 1.0 release version of the IDE. In particular some older examples and libraries may have this at the start:

Code:
#include "WProgram.h"

If you get errors try locating such places and changing that line to:

Code:
#include "Arduino.h"

* IDE = Integrated Development Environment


From: http://arduino.cc/forum/index.php/topic,97455.0.html

I'll give it a try and get back to you.

EDIT: Compiled properly. Thanks.

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy