witnessmenow / Universal-Arduino-Telegram-Bot

Use Telegram on your Arduino (ESP8266 or Wifi-101 boards)
MIT License
1.12k stars 306 forks source link

VS code + PlatformIO = Failed to find the file #291

Closed SirSerow closed 2 years ago

SirSerow commented 2 years ago

Greetings to anyone reading this issue!

I’ve been making a test project using UniversalTelegramBot library in Visual Studio Code with PlatformIO extension and encountered a problem on the compilation stage. VS code is unable to find one of the ArduinoJson library files and returns an error:

include/ArduinoJson/src/ArduinoJson/Array/ArrayRef.hpp:7:10: fatal error: ArduinoJson/Array/ArrayFunctions.hpp: No such file or directory

I did not make any changes to ArduinoJson library files, and provided the path to the library in C/C++ Configurations tab. The project is structured as follows:

image image

All additional libraries are stored in the “include” folder and are visible in VS code explorer tab. I also get not underlining which occurs when some file is missing. You can take a look at the main file in following directory:

https://github.com/SirSerow/ESP32_Temperature_Monitoring_Telegram_Bot/tree/main/src

What am I doing wrong?

P.S. I am sorry if this question is not directly related to the UniversalTelegramBot repository, just writing here in hope that anyone has encountered a similar problem before.

Thank you in advance and have a great day!

SirSerow commented 2 years ago

✅ Solved by moving library files ro "src" folder.