Adafruit library compile error

Hello,

I have tried to compile adafurit library on the web IDE but got error when try to compile. Any suggestions ?

Processing testno_vlaga.ino
Checking library SparkFun_Qwiic_Humidity_AHT20_Arduino_Library...
Checking library Arduino_AHT10...
Installing library Arduino_AHT10 0.1.0 to lib/Arduino_AHT10 ...
Installing library SparkFun_Qwiic_Humidity_AHT20_Arduino_Library 1.0.0 to lib/SparkFun_Qwiic_Humidity_AHT20_Arduino_Library ...
Library SparkFun_Qwiic_Humidity_AHT20_Arduino_Library 1.0.0 installed.
Library Arduino_AHT10 0.1.0 installed.
make -C ../modules/photon/user-part all
make[1]: Entering directory /firmware/modules/photon/user-part' make -C ../../../user make[2]: Entering directory /firmware/user'
Building cpp file: src/testno_vlaga.cpp
Invoking: ARM GCC CPP Compiler
mkdir -p ../build/target/user/platform-8-msrc/
arm-none-eabi-gcc -DSTM32_DEVICE -DSTM32F2XX -DPLATFORM_THREADING=1 -DPLATFORM_ID=8 -DPLATFORM_NAME=P1 -DPLATFORM_GEN=2 -DUSBD_VID_SPARK=0x2B04 -DUSBD_PID_DFU=0xD008 -DUSBD_PID_CDC=0xC008 -DSPARK_PLATFORM -g3 -gdwarf-2 -Os -mcpu=cortex-m3 -mthumb --specs=nano.specs -DINCLUDE_PLATFORM=1 -DPRODUCT_ID=8 -DPRODUCT_FIRMWARE_VERSION=65535 -DUSE_STDPERIPH_DRIVER -DDFU_BUILD_ENABLE -DSYSTEM_VERSION_STRING=2.3.1 -DRELEASE_BUILD -I./inc -I../wiring/inc -I../system/inc -I../services/inc -I../third_party/nanopb/nanopb -I../communication/inc -I../hal/inc -I../hal/shared -I../hal/src/photon -I../hal/src/stm32f2xx -I../hal/src/stm32 -I../hal/network/util -I../hal/network -I../hal/src/photon/api -I../hal/src/photon/include -I../hal/src/photon/wiced/security/BESL/host/WICED/ -I../hal/src/photon/wiced/security/BESL/include -I../hal/src/photon/wiced/security/BESL -I../hal/src/photon/wiced/security/BESL/crypto -I../hal/src/photon/wiced/WWD/include/ -I../hal/src/photon/wiced/platform/include/ -I../hal/src/photon/wiced/platform/GCC/ -I../hal/src/photon/wiced/security/BESL/supplicant/ -I../hal/src/photon/libraries/crypto -I../hal/src/photon/libraries/daemons/DNS_redirect -I../third_party/miniz/miniz -I../platform/shared/inc -I../platform/MCU/STM32F2xx/STM32_USB_Host_Driver/inc -I../platform/MCU/STM32F2xx/STM32_USB_OTG_Driver/inc -I../platform/MCU/STM32F2xx/STM32_StdPeriph_Driver/inc -I../platform/MCU/STM32F2xx/STM32_USB_Device_Driver/inc -I../platform/MCU/STM32F2xx/SPARK_Firmware_Driver/inc -I../platform/MCU/shared/STM32/inc -I../platform/MCU/STM32F2xx/CMSIS/Include -I../platform/MCU/STM32F2xx/CMSIS/Device/ST/Include -I../dynalib/inc -Isrc -I./libraries -Ilib/Arduino_AHT10/src -Ilib/SparkFun_Qwiic_Humidity_AHT20_Arduino_Library/src -I. -MD -MP -MF ../build/target/user/platform-8-msrc/testno_vlaga.o.d -ffunction-sections -fdata-sections -Wall -Wno-switch -Wno-error=deprecated-declarations -fmessage-length=0 -fno-strict-aliasing -DSPARK=1 -DPARTICLE=1 -Werror=return-type -Wundef -DSTART_DFU_FLASHER_SERIAL_SPEED=14400 -DSTART_YMODEM_FLASHER_SERIAL_SPEED=28800 -DBOOTLOADER_SDK_3_3_0_PARTICLE -DPARTICLE_DCT_COMPATIBILITY -DSPARK_PLATFORM_NET=BCM9WCDUSI14 -fno-builtin-malloc -fno-builtin-free -fno-builtin-realloc -DLOG_INCLUDE_SOURCE_INFO=1 -DPARTICLE_USER_MODULE -DUSER_FIRMWARE_IMAGE_SIZE=0x20000 -DUSER_FIRMWARE_IMAGE_LOCATION=0x80A0000 -DMODULAR_FIRMWARE=1 -DMODULE_VERSION=6 -DMODULE_FUNCTION=5 -DMODULE_INDEX=1 -DMODULE_DEPENDENCY=4,2,2302 -DMODULE_DEPENDENCY2=0,0,0 -D_GNU_SOURCE -DLOG_MODULE_CATEGORY=""app"" -fno-exceptions -fno-rtti -fcheck-new -flto -ffat-lto-objects -DPARTICLE_COMPILE_LTO_FAT -fno-use-cxa-atexit -std=gnu++14 -c -o ../build/target/user/platform-8-msrc/testno_vlaga.o src/testno_vlaga.cpp
src/testno_vlaga.cpp:2:10: fatal error: SparkFun_Qwiic_Humidity_AHT20_Arduino_Library.h: No such file or directory
2 | #include <SparkFun_Qwiic_Humidity_AHT20_Arduino_Library.h>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [../build/target/user/platform-8-msrc/testno_vlaga.o] Error 1
make[2]: Leaving directory /firmware/user' make[1]: *** [user] Error 2 make[1]: Leaving directory /firmware/modules/photon/user-part'
make: *** [modules/photon/user-part] Error 2

There obviously is some naming error in the library

Normally the library name and the name of the main header file should be the same.
Here they are not and hence the include statement, automatically added by Web IDE, is wrong. Just correct that (i.e. remove the _Arduino_Library part) and you should be good to go.

Thanks man, it is working.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.