1

when I try to compile my Arduino UNO sketches using the official latest version Arduino software on Windows 7, I get this error

sketch\sketch_may21a.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/Genuino Uno.

what is the solution? What should i do?

3 Answers 3

4

I know it's been a while but it might be helpful for other people. I Solved my problem by doing the following from arduino forums:

  1. Close the Arduino IDE
  2. Go the the folder below:

    For Mac OS X:

    • /Users/(username)/Library/Arduino15

    For Windows:

    • Arduino IDE 1.6.5r5 and previous: C:\Users(username)\AppData\Roaming\Arduino15

    • Arduino IDE 1.6.6 and later: C:\Users(username)\AppData\Local\Arduino15

  3. Delete the Arduino15 Folder

  4. Reinstall the IDE.

Step 4 was not necessary for me, but if you messed with the libs, you should do a clean install.

Hope it's helpful.

1
  • I suppose for GNU/Linux, steps 2-4 would be rm -rf ~/.arduino15
    – AstroFloyd
    Mar 2, 2018 at 8:01
2

I was also facing this problem. so what I did is, GO to Device manager select the Arduino port COM.. .disable by click right, unplug & replug the Arduino, go to device manager select the Arduino port COM.. right click Enable that. then try. I hope that will help you out.

1

Most exit status 1 Error compiling for board Arduino/Genuino Uno error comes if you don't have libraries for the header.

Solution is to download libraries and add to directory: C:\Program Files (x86)\Arduino\libraries

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.