-
Notifications
You must be signed in to change notification settings - Fork 236
Can't find library when switched to CLI #1595
Comments
I do not believe the CLI shares the directories with the legacy IDE. Can you try restoring the libraries using the menus in VS Code? |
I had same problem after accepting same prompt to swtich to CLI, and can confirm that @robotdad's suggestion worked for me! Thanks @robotdad! VS code Output window showed a bit of encouraging but confusing output (note: I had extension's verbose logging turned on)
Manually running the
I'll admit I find library management within the VS code extension a bit mysterious. For instance, now that I switched to the CLI, I'm not sure where the extension searches for libraries and where additional libraries paths can be configured. Should I do it with the arduino-cli.exe directly? I've just seen that within the Arduino library manager in VScode, there's an "Installed" Type filter, and for each of the library's the filter shows, there's an with an option to "include library". That's great! While I was aware of the the Library Manager and Type filter, I hadn't considered that "Installed" would be a Type and so I didn't even bother to explore the drop-down menu closer. 🤦♂️ Now to just understand where the library path's are specified and config'd... |
I didn’t know you could install libraries through VS code, I’ll have a look to see how to do this. Does anyone know where the libraries get stored when doing it this way? Specifically on Mac? I had to fix/modify a couple of libraries to build for ESP32 as its compiler is more strict on warnings. For these I forked the library, added a fix commit and then installed the library manually by cloning my forked repo. |
Library manager in vscode showed it was already installed, I had to remove then reinstall. It uses the original library location, I had changed mine to a slighty different location. Can I do this with the extension? The examples are still from my modified library location. |
I think this setting needs to be ported to the extension as I don't want to be forced to use Edit: |
Would be nice if --export-binaries could be used as well |
I fixed this by setting an environment variable ARDUINO_DIRECTORIES_USER to match my sketchbook directory on an extra hard drive (in my case on windows, E:\source\arduino). You will have to restart vscode for it to pull it in. I did it quickly through System Properties. |
Following works for me on Windows: If you want to check it type: Toggle the VS Code and try to Verify your project. In file .vscode\c_cpp_properties.json check the property "includePath" which should reflect your changes. |
What do you mean? I too am horribly stuck trying to migrate to VSC from Arduino IDE. VSC with the bundled arduino-cli cannot find my libraries and I have no idea how to help it. |
I got a message in VS Code to say that the legacy IDE was going to be removed and to move to the bundled CLI. So I did. Now when I click the little verify button to build my project it can't find one of the libraries. The library is in my sketchbook
libraries
directory.It worked before switching to CLI and when I open the Arduino IDE 1.8.19 and click verify it works fine.
fatal error: ezButton.h: No such file or directory
I use a Mac.
Extension version v0.5.0
The text was updated successfully, but these errors were encountered: