-->
Page 1 of 1

AVR libraries not found when compiling

PostPosted: Mon Jul 04, 2016 1:24 pm
by nikko4913
Hey.

For several days i've been struggling with some errors i get when trying to compile any sketch that uses avr libraries (eg. <avr/power.h> and so). This is what i get when trying to compile a sketch like that:

Code: Select allC:\Users\NikolajBanke\Desktop\ESP8266\ESP8266_BASE_12_10_15_ESP_part3\ESP8266_BASE_12_10_15_ESP_part3.ino:6:23: fatal error: avr/power.h: No such file or directory

 #include <avr/power.h>

                       ^

compilation terminated.


This happens only when compiling for a generic ESP8266 module. I tried compiling it for the Arduino UNO, and i didn't get that same error. Do any of you people know a workaround for this?

This is what i have:
- Arduino IDE version 1.6.9 (Tried both portable and installed, no difference)
- Tried every single version of the Boards Package available in the Boards Manager.

Do you guys know a possible fix for this?

If you have any questions, feel free to ask me!

Re: AVR libraries not found when compiling

PostPosted: Mon Jul 04, 2016 1:56 pm
by martinayotte
It seems that you trying to compile using a library that isn't ESP aware, because "avr/power.h" doesn't exist in ESP while it is existing for AVR.
What is that library ?
Did you tried commenting this include temporarily ?

Re: AVR libraries not found when compiling

PostPosted: Tue Jul 05, 2016 8:08 am
by nikko4913
Okay, got it to work!
Turns out that the AVR library isn't necessary. I did, however, get some other errors when removing the #include line, but they weren't related to the AVR libraries missing, at all. They just seemed like it to me, after a long night and me being very tired.

Anyway, thank you for your input :)