I'm trying to compile example files for receiving IR signals using the Arduino Cloud IDE. The inlude for many header files is missing while trying to compile. The error message is like the following:
In file included from /mnt/create-efs/webide/9e/87/9e879e4336aea3a9e53fc1faf5565892:karantejas/libraries_v2/IRremoteESP8266/src/IRac.h:15:0,
from /mnt/create-efs/webide/9e/87/9e879e4336aea3a9e53fc1faf5565892:karantejas/libraries_v2/IRremoteESP8266/src/IRac.cpp:7:
/mnt/create-efs/webide/9e/87/9e879e4336aea3a9e53fc1faf5565892:karantejas/libraries_v2/IRremoteESP8266/src/ir_Argo.h:14:10: fatal error: set: No such file or directory
#include <set>
^~~~~
compilation terminated.
I actually faced this issue with IDE on my laptop. To check if it was a issue with my laptop, I used the Arduino cloud.
To Reproduce
1. Open the Arduino Cloud IDE. 2. Upload the IRremoteESP8266 Library. 3. Compile the IRecvDump3 example.
@xfpd, There was no formatting on the web IDE, but there was some indentation in the IDE on my laptop,
In file included from C:\Users\Karan\OneDrive\Documents\Arduino\libraries\IRremoteESP8266\src/stdlib.h:36:0,
from C:\Users\Karan\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Arduino.h:23,
from C:\Users\Karan\AppData\Local\Temp\.arduinoIDE-unsaved2024314-30576-1ed8n36.nhzv\ControlSamsungAC\ControlSamsungAC.ino:26:
C:\Users\Karan\OneDrive\Documents\Arduino\libraries\IRremoteESP8266\src/cstdlib:41:10: fatal error: bits/c++config.h: No such file or directory
#include <bits/c++config.h>
^~~~~~~~~~~~~~~~~~
compilation terminated.
exit status 1
Compilation error: exit status 1
Hi @ptillisch , I have not selected any Arduino board, I'm just trying to compile the sketch. I'm under the assumption that you do not need a board to verify the code. Please correct me if that is wrong
It is true that you don't need to own any hardware to verify a sketch. However, it is mandatory for you to select which board the sketch should be compiled for. The reason is that the sketch must be compiled as appropriate to run on the target hardware.
The board selection is shown here on the Cloud Editor toolbar:
You can see that I happened to have "Arduino Uno" selected in my Cloud Editor when I took that screenshot.
The sketch you are verifying is written for use with boards that have an ESP8266 microcontroller. I can see from the new error message you shared that you have selected one of the boards with a microcontroller of the AVR architecture in Arduino IDE. You cannot use this sketch with AVR boards. That is the cause of the error.
Do you own an Arduino board? If yes, which Arduino board do you own? If no, is there a specific Arduino board you plan to use in your project once you obtain the hardware?
@ptillisch , thanks for that, actually even mine was selected for Arduino Uno which was just hidden under a popup .
Actually I own a Arduino Uno board, but I was planning to buy a ESP8266 or ESP 32 for trying out a few things. I was checking if these scripts are compiling fine on my board. I get the issue now.