WProgram.h: No such file or directory

ok.thanks.

OK, Difficult to see, but "WProgram.h" should be <WProgram.h>

I downloaded the three files you linked.

I copied the library files into my "libraries" folder and restarted the IDE.

I removed the #include <WProgram.h> from inside MAX6675.cpp.

I changed #include <WProgram.h> to #include <Arduino.h> inside MAX6675.h

Your example sketch compiled without errors.

Now, your turn.

salim_yilmaz:
awol i tried reply #8 probably max6675.h have a error.Can you try to max6675.h

What do you mean it "probably" had an error?

Read this before posting a programming question

Post your errors. Copy and paste. Don't say it "probably" had an error.

i fixed problem.I would like to thank all of you

If you READ the error message which you posted, the bad include statement was in the sketch INO file and not in the library H or CPP file.

So go to the INO file and replace the reference to WProgram.h with Arduino.h

HazardsMind:
You have to go into the .h and .cpp files and change "WProgram.h" to Arduino.h

Thank you, I made the change and it worked fine.

Banged my head on this for a while, the zip extracted the library folder with a Read-Only.
The files inside are not read only but because the Folder is Arduino ain't happy.

I am new to Arduino and I am having the same problem here in March 3, 2015

I'm new to Arduino to. I'm having exactly the same problem. I'm going to reread this tomorrow and try and figure it out once and for all. :confused:

I'm new to Arduino to. I'm having exactly the same problem. I'm going to reread this tomorrow and try and figure it out once and for all. :confused:

Good Afternoon. I'm trying to do the project called "Ultrasonic Alarm" corresponding to page 333 of the same book: http://www.fema.com.br/arduino/wp-content/uploads/2014/08/arduino.pdf
In this project I use the "LV-MaxSonar EZ3 *" but at the code for the Arduino asks me the following error:

In file included from sketch_mar13a.ino: 1: 0:
C: \ Users \ admin \ Documents \ Arduino \ libraries \ LedControl / LedControl.h: 24: 22: fatal error: WProgram.h: No such file or directory
#include <WProgram.h>
^
compilation terminated.
Error compiling.

I would like to help me solve this problem. thank you

Where it says WProgram.h in your scetch put Arduino.h instead.

driedeker:
Where it says WProgram.h in your scetch put Arduino.h instead.

Better late than never, I guess...

You probably have to change the permissions on the library folder. Go to the Arduino Library folder and right click -> Properties. Select the Security Tab, Click "Advanced". You'll probably see that Users have only "Read & Execute" permissions if you are not an administrator. You need to change the permission to "Full Control".

Did you bother to read the thread, jb8ker? WProgram.h is not used in the Arduino IDE/SDK anymore.

Correct. I did read (most) of the thread. I understand that WProgram.h is no longer used. I'm saying that is likely not allowing him to save or make the change in the .cpp file because he doesn't have the permissions set correctly. I find this happens often on my work computer, where folders in Program Files are defaulted to have permissions of "Read Only". You need to manually change the permissions of the library folders so that you have full control.

Assuming the issue is still " missing WProgram.h" and not some OS permissions issue.

Beauty of software that there are many different ways to accomplish the task.

In this case you can be "cut and paste" hacker and replace WProgram.h with Arduino.h because some alleged authority said so or you can be on your way to became real pro ( learn preprocessor ) and add what is missing in the long forgotten and abandoned "library":

#ifdef ARDUINO
#if ARDUINO < 100
#include "WProgram.h"
#else
#include "Arduino.h"
......

Your choice.

since the Bounce.cpp in libraries/Bounce folder is read only u can not modify it...

Rather u can try moving the Bounce folder to desktop ...

Remove the Read-only permissions in properties of the Bounce folder as well for the Bounce.cpp...

now open the Bounce.cpp in notepad and modify the first header file #include "WProgram.h" to #include "Arduino.h" and save..

now move the Bounce folder to the libraries section again...

The above procedure worked for me :slight_smile:

warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]

Password password = Password( "1234" );

how can i solve this error in arduino software