Skip to content
This repository was archived by the owner on Oct 1, 2024. It is now read-only.

Unable to locate library file when compiling with VSCode but fine with ArduinoIDE #1597

Closed
reflectingme opened this issue Feb 18, 2023 · 4 comments
Assignees
Labels
bug intellisense needs-more-info More details about this issue are needed for it to be actionable. stale

Comments

@reflectingme
Copy link

I appear to have an issue with libraries when trying to compile and or upload with VSCode.

When I use either of the Arduino IDE's to compile and upload the code, it works without any issues and the app runs fine on my ESP32S3 board. However, when I do the same thing in VSCode, I get the error unable to locate the file "TFT_eSPI.h" as indicated by the error underline in screenshot.

I have of course ensured the TFT_eSPI library is installed correctly, which it is as the sketch runs fine when compiled with Arduino IDE, but just not with VSCode.

Could someone please help and point me in the right direction please. I am not fond of the Arduino IDE and would much rather use VSCode or even VS2022 which I use for playing around with c# and .net.

Many thanks.

Screenshot 2023-02-18 at 22 48 57

@github-actions github-actions bot added the triage New issues that have not been reviewed. label Feb 18, 2023
@benmcmorran benmcmorran self-assigned this Feb 22, 2023
@benmcmorran benmcmorran added bug intellisense needs-more-info More details about this issue are needed for it to be actionable. and removed triage New issues that have not been reviewed. labels Feb 22, 2023
@benmcmorran
Copy link
Member

Can you try installing the library that provides TFT_eSPI.h using the library manager in VS Code? Run the "Arduino: Library Manager" command in the VS Code command palette. If you started using the Arduino CLI in the latest version of this extension, libraries may be in a different directory now (see #1595).

@reflectingme
Copy link
Author

Thanks Ben... I have managed (I think) to figure out what was happening. It really is to do with my lack of experience and knowledge on #include paths. I updated the include path in the configuration within VSCode, and have sort of got it to work. I need to research/kearn what the /** means at the end of each include line, and how to ensure I add the full relative path to any files I am working with.

Sorry to have used your time here for what must be, for you, a trivial issue.

@github-actions
Copy link

This issue has been automatically marked as stale because it has been inactive for 30 days. To reactivate the issue, simply post a comment with the requested information to help us diagnose this issue. If this issue remains inactive for another 7 days, it will be automatically closed.

@github-actions github-actions bot added the stale label Apr 14, 2023
@github-actions
Copy link

This issue has been automatically closed due to inactivity. If you are still experiencing problems, please open a new issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug intellisense needs-more-info More details about this issue are needed for it to be actionable. stale
Projects
None yet
Development

No branches or pull requests

2 participants