arduino / arduino-cli

Arduino command line tool
https://arduino.github.io/arduino-cli/latest/
GNU General Public License v3.0
4.32k stars 373 forks source link

Library is not resolved #279

Closed sslupsky closed 5 years ago

sslupsky commented 5 years ago

Bug Report

Current behavior

'arduino-cli lib list' does not list the Adafruit ADS1X15 library. I can see this library with the IDE and it shows as "installed". The library directory exists and it is located withthe other arduino libraries in the libraries directory.

Name                                                        Installed   Available   Location  
HDC2010                                                     1.0.0                   sketchbook
RTCZero                                                     1.5.3                   sketchbook
SparkFun_9DoF_IMU_Breakout_-_ICM_20948_-_Arduino_Library    1.0.2                   sketchbook
witap_watchdog                                              0.0.1                   sketchbook
Adafruit_Circuit_Playground                                 1.8.3                   sketchbook
Arduino-Scheduler                                           1.2.7                   sketchbook
ClosedCube_I2C_Arduino                                      1.2.1                   sketchbook
CayenneLPP                                                  1.0.1                   sketchbook
Sodaq_wdt                                                   1.0.2                   sketchbook
FlashStorage                                                0.7.1                   sketchbook
Adafruit_SHT31_Library                                      1.1.0                   sketchbook
Arduino-Log                                                 1.0.3                   sketchbook
Arduino_Low_Power                                           1.2.1                   sketchbook
ClosedCube_TMP116_Arduino                                   1.0.2                   sketchbook
JLed                                                        4.0.0-rc1               sketchbook
ZeroRegs                                                    0.2.2                   sketchbook

I can compile a sketch using the VS Code Arduino plugin. However, the arduino-cli compile fails as follows:

ResolveLibrary(Adafruit_ADS1015.h)
  -> candidates: []
In file included from /Users/stevenslupsky/Library/Mobile Documents/com~apple~CloudDocs/source/witap_mkrdock/witap_mkrdock.ino:1:0:
/Users/stevenslupsky/Library/Mobile Documents/com~apple~CloudDocs/source/witap_mkrdock/build/sketch/witap_mkrdock.h:35:10: fatal error: Adafruit_ADS1015.h: No such file or directory
 #include <Adafruit_ADS1015.h>

Expected behavior

Compile should complete.

Environment

sslupsky commented 5 years ago

I figured this out. It was working fine on another computer. The difference was the sketchbook path in arduino-cli.yaml was not set properly. I switched computers and overlooked that I had set the path on the other computer.