Go Down

Topic: "fatal error: Arduino.h: No such file or directory" Error (Read 22059 times) previous topic - next topic

ArnieBot

No worries.
"Arduino.h" must be needed by a file that's compiled before the sketch's *.ino file. That's the only way that line could fail.
Unfortunately, I'm all out of ideas at this point. Everything points to an incorrect installation of Arduino, such that it doesn't know where to find "Arduino.h".
I don't know what else to suggest.

If no one else comes along to help, as a last resort you could try uninstalling then installing an even earlier version of the IDE. I noticed that you tried V1.6.7, but that's one of the not-so-stable versions. You could try V1.6.5. Prior to V1.6.9, it was the last truly stable version. (I'm using V1.6.5 with Windows 10, and have had no problems.)

Having said that, I'll have to leave it with you, I'm afraid. I'll keep monitoring this thread in case someone, maybe @pert, comes up with a solution. Then I'll know what to say the next time someone has this problem.
Sorry I couldn't be of more help.
I have just installed V1.6.5 and I think Blink compiles!!!!!!!!!!!!!

-Just checking if it says 'Done Compiling' and only has

"Build options changed, rebuilding all

Sketch uses 1,030 bytes (3%) of program storage space. Maximum is 30,720 bytes.
Global variables use 9 bytes (0%) of dynamic memory, leaving 2,039 bytes for local variables. Maximum is 2,048 bytes."

in the output box, it has been successful????

I am curious as to why it was not compiling, but at least now I can start coding!!!!!!!

Thank you very much for pointing me in the correct direction :D

ArnieBot :)

OldSteve

I have just installed V1.6.5 and I think Blink compiles!!!!!!!!!!!!!

-Just checking if it says 'Done Compiling' and only has

"Build options changed, rebuilding all

Sketch uses 1,030 bytes (3%) of program storage space. Maximum is 30,720 bytes.
Global variables use 9 bytes (0%) of dynamic memory, leaving 2,039 bytes for local variables. Maximum is 2,048 bytes."

in the output box, it has been successful????

I am curious as to why it was not compiling, but at least now I can start coding!!!!!!!

Thank you very much for pointing me in the correct direction :D

ArnieBot :)
Excellent. Yes, that message means that compilation was successful. You're in business. :)

I'm curious as to why it wouldn't compile before with V1.6.9 too, but let's just add it to the list of life's great mysteries. :D

You'll find that V1.6.5 is very stable, so you shouldn't have any problems.
Now you can have some fun. Enjoy.
Please do not PM me for help. I am not a personal consultant.
And others will benefit as well if you post your question publicly on the forums.

ArnieBot

Excellent. Yes, that message means that compilation was successful. You're in business. :)

I'm curious as to why it wouldn't compile before with V1.6.9 too, but let's just add it to the list of life's great mysteries. :D

You'll find that V1.6.5 is very stable, so you shouldn't have any problems.
Now you can have some fun. Enjoy.
Let the coding begin!!!!!!!!!

Thank you very much :D

ArnieBot :)

cattledog

@ArnieBot

I am successfully using 1.6.9 with Windows 10 and have not encountered any problems like you have.

I'm confused about not finding Arduino15. It is a folder, not a file, and is in users\your name\appdata\local.

It contains "preferences". You will also see this path when you access "preferrences" through the file tab of the ide window.

Preferences indicates the hardware path and tells the compiler where to find arduino.h

ArnieBot

@ArnieBot

I am successfully using 1.6.9 with Windows 10 and have not encountered any problems like you have.

I'm confused about not finding Arduino15. It is a folder, not a file, and is in users\your name\appdata\local.

It contains "preferences". You will also see this path when you access "preferrences" through the file tab of the ide window.

Preferences indicates the hardware path and tells the compiler where to find arduino.h
Now that I have 1.6.5 I have found the folder Arduino15. I think when I was looking for it, I had already uninstalled 1.6.9 and I was checking to see if it still remained, as it could be a cause of errors when the Arduino is re-installed?

OldSteve

....and is in users\your name\appdata\local.
Aha, that's what's changed in V1.6.9 since V1.6.5. "Arduino15" has moved from "\AppData\Roaming" to "\AppData\Local"
I'll try to remember that. (I had a sneaking suspicion that it might have been moved in later versions.)
I didn't realise that "Preferences.txt" was in "Arduino15", either. I've opened that file heaps of times, but simply clicked on the link in the IDE without taking notice of the actual path.  :smiley-roll-blue:

I think when I was looking for it, I had already uninstalled 1.6.9
Right. I didn't realise that you'd already uninstalled V1.6.9 at that time.

Not to worry - all's well that ends well. :)
Please do not PM me for help. I am not a personal consultant.
And others will benefit as well if you post your question publicly on the forums.

oqibidipo

The path was changed in IDE 1.6.6.

https://github.com/arduino/Arduino/pull/3404

Quote
This PR aims at solving the long debate that took place on the developers mailing list about the location of cores/tools installed through Boards Manager. On windows it was Roaming\Arduino15, which breaks Microsoft rules and causes troubles to who actually like own profile to roam between different computers

New location is %LOCALAPPDATA%\Arduino15

When no custom preferences file location is specified (via CLI) and if the IDE finds something in %APPDATA%\Arduino15 and no %LOCALAPPDATA%\Arduino15 is present, IDE prefs files will be moved. Nothing will happen otherwise.

OldSteve

The path was changed in IDE 1.6.6.

https://github.com/arduino/Arduino/pull/3404
Right. Thanks for the extra info.
I've now learned a couple of new things over the course of this thread. Every bit helps. :)
(Still wondering exactly what caused ArnieBot's problem though. It's a mystery. Perhaps a corrupted "Preferences.txt" file.)
Please do not PM me for help. I am not a personal consultant.
And others will benefit as well if you post your question publicly on the forums.

ArnieBot

(Still wondering exactly what caused ArnieBot's problem though. It's a mystery. Perhaps a corrupted "Preferences.txt" file.)
I am still curious too!!! It could be a corrupt file, I have no idea :D

Thank you for all of your help :)

ArnieBot

nunofyourbusiness

Hello.

I know this is about a month after the issue, but I would like to inform you that I had the same problem and deleting the Arduino15 folder worked for me. I found it in users/(name)/appdata/local not users/(name)/appdata/roaming. I uninstalled Arduino, then deleted Arduino15 folder, then reinstalled and I have Arduino 1.6.9 working again. It sounded like you couldn't find the folder until after you decided to revert to 1.6.5. :)

OldSteve

Hello.

I know this is about a month after the issue, but I would like to inform you that I had the same problem and deleting the Arduino15 folder worked for me. I found it in users/(name)/appdata/local not users/(name)/appdata/roaming. I uninstalled Arduino, then deleted Arduino15 folder, then reinstalled and I have Arduino 1.6.9 working again. It sounded like you couldn't find the folder until after you decided to revert to 1.6.5. :)
Thanks for adding this. It could help someone else in the future. (And so could your thread on the issue.)
Please do not PM me for help. I am not a personal consultant.
And others will benefit as well if you post your question publicly on the forums.

Timberwolf303

Hi Everyone :)

I am very new to using Arduino and am trying to use the 'Blink' example on my board, however when I press verify it produces the following error:

Code: [Select]

Arduino: 1.6.9 (Windows 10), Board: "Arduino Duemilanove or Diecimila, ATmega328"

sketch\Blink.ino.cpp:1:21: fatal error: Arduino.h: No such file or directory

 #include <Arduino.h>

                     ^

compilation terminated.

exit status 1
Error compiling for board Arduino Duemilanove or Diecimila.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.



Like I said before, I am really new to Arduino, but I have tried looking at other forum entries and across the Internet and nothing has solved my problem :'(

Any help would be much appreciated!

Thank you,

ArnieBot
Hi, what worked fine for me was to upgrade my boards library by clicking in Tools>Board: "Arduino/Genuino Uno" or the selected board >Board Manager. Then a list of all the boards libraries is displayed, select Arduino AVR Boards by Arduino and an "Upgrade" button will appear. Click and wait until it has finished, I have now the version 1.6.21 and no more errors appear.


Good Luck.

Go Up