If I want to use library functions from stdio.h and stdlib.h am i amble to declare those header files in an arduino IDE code file? Or are those headers and associated library functions already built into arduino coding when I use the arduino IDE to tweak some arduino code file?
Can't compile any sketch, "stdlib.h not found"
Arduino-IDE 1.8.5 - fatal error: stdlib.h: No such file or directory
Stdlib.h missing again
Stdlib.h
I'm trying to set up an environment for an ESP8266 Wemos with VSCode and the Arduino plugin. Apparently, verify + deploy works, but Intellisense throws an error for the "ESP8266WiFi.h" header, namely that
cannot open source file "stdlib.h" (dependency of "C:\Users\[me]\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\cores\esp8266\Arduino.h")
I found the ESP board manager's stdlib.h under the folder
C:\Users\[still me]\AppData\Local\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.1.0-gcc10.3-e5f9fec\xtensa-lx106-elf\include
But if I add it to the c_cpp_properties.json the (probably) plugin instantly removes it at the next intellisense analyze session, thus still causing an error message.
The whole cpp file:
{
"version": 4,
"configurations": [
{
"name": "Arduino",
"compilerPath": "@C:\\Users\\[me]\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\3.1.1\\tools\\warnings\\none-g++",
"compilerArgs": [
"-U__STRICT_ANSI__",
"-free",
"-fipa-pta",
"-Werror=return-type",
"-mlongcalls",
"-mtext-section-literals",
"-fno-rtti",
"-falign-functions=4",
"-std=gnu++17"
],
"intelliSenseMode": "gcc-x64",
"includePath": [
"C:\\Users\\[me]\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\3.1.1\\tools\\sdk\\include",
"C:\\Users\\[me]\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\3.1.1\\tools\\sdk\\lwip2\\include",
"C:\\Users\\[me]\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\3.1.1\\cores\\esp8266",
"C:\\Users\\[me]\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\3.1.1\\variants\\d1_mini",
"C:\\Users\\[me]\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\3.1.1\\libraries\\ESP8266WiFi\\src",
"C:\\Users\\[me]\\Documents\\Arduino\\libraries\\PubSubClient-2.8.0\\src"
],
"forcedInclude": [
"C:\\Users\\[me]\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\3.1.1\\cores\\esp8266\\Arduino.h"
],
"cStandard": "c11",
"cppStandard": "c++17",
"defines": [
"__ets__",
"ICACHE_FLASH",
"_GNU_SOURCE",
"ESP8266",
"MMU_IRAM_SIZE=0x8000",
"MMU_ICACHE_SIZE=0x8000",
"NONOSDK22x_190703=1",
"F_CPU=80000000L",
"LWIP_OPEN_SRC",
"TCP_MSS=536",
"LWIP_FEATURES=1",
"LWIP_IPV6=0",
"ARDUINO=10813",
"ARDUINO_ESP8266_WEMOS_D1MINI",
"ARDUINO_ARCH_ESP8266",
"ARDUINO_BOARD=\"ESP8266_WEMOS_D1MINI\"",
"ARDUINO_BOARD_ID=\"d1_mini_clone\"",
"FLASHMODE_DOUT",
"USBCON"
]
}
]
}Fun part 2:
The @C:\\Users\\[me]\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\3.1.1\\tools\\warnings\\none-g++ also seem to be corrupted because thanks to the @, the intellisense interprets it as [projectpath]\[path from json] instead of an absolute path. Altho building works, the VSCode constantly highlights the json file for errors. Whenever I change this, the (probably) plugin instantly changes it back to this nonsense.