Include in project...No such file or directory

Have troubles including SW from library with web IDE and do not seem to find any post solving it.
It has been working fine for long time but just started on new SW project and no matter what code I take from the library I try to include fails.

SW on device is V1.0.0. Have tried with 0.7.0.0
Compiling same device with some of my older SW with same includes works fine.
I have dumped the cache in the IDE.

RAW error msg:

Processing  jamscanner_run_avg.ino
Checking library RunningAverage...
Installing library RunningAverage 0.0.1 to lib/RunningAverage ...
Library RunningAverage 0.0.1 installed.
make -C ../modules/electron/user-part all
make[1]: Entering directory '/firmware/modules/electron/user-part'
make -C ../../../user 
make[2]: Entering directory '/firmware/user'
Building cpp file: src/jamscanner_run_avg.cpp
Invoking: ARM GCC CPP Compiler
mkdir -p ../build/target/user/platform-10-msrc/
arm-none-eabi-gcc -DSTM32_DEVICE -DSTM32F2XX -DPLATFORM_THREADING=1 -DPLATFORM_ID=10 -DPLATFORM_NAME=electron -DUSBD_VID_SPARK=0x2B04 -DUSBD_PID_DFU=0xD00A -DUSBD_PID_CDC=0xC00A -DSPARK_PLATFORM -g3 -gdwarf-2 -Os -mcpu=cortex-m3 -mthumb -DINCLUDE_PLATFORM=1 -DPRODUCT_ID=10 -DPRODUCT_FIRMWARE_VERSION=65535 -DUSE_STDPERIPH_DRIVER -DDFU_BUILD_ENABLE -DSYSTEM_VERSION_STRING=1.0.0 -DRELEASE_BUILD -I./inc -I../wiring/inc -I../system/inc -I../services/inc -I../services/nanopb -I../communication/src -I../hal/inc -I../hal/shared -I/rtos/FreeRTOSv8.2.2/FreeRTOS/Source/include -I/rtos/FreeRTOSv8.2.2/FreeRTOS/Source/portable/GCC/ARM_CM3 -I../hal/src/electron -I../hal/src/stm32f2xx -I../hal/src/stm32 -I../platform/shared/inc -I../platform/MCU/STM32F2xx/STM32_USB_Host_Driver/inc -I../platform/MCU/STM32F2xx/STM32_StdPeriph_Driver/inc -I../platform/MCU/STM32F2xx/STM32_USB_OTG_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/RunningAverage/src -I. -MD -MP -MF ../build/target/user/platform-10-msrc/jamscanner_run_avg.o.d -ffunction-sections -fdata-sections -Wall -Wno-switch -Wno-error=deprecated-declarations -fmessage-length=0 -fno-strict-aliasing -DSPARK=1 -DPARTICLE=1 -Wundef -DSTART_DFU_FLASHER_SERIAL_SPEED=14400 -DSTART_YMODEM_FLASHER_SERIAL_SPEED=28800 -DSPARK_PLATFORM_NET=UBLOXSARA -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=0x8080000 -DMODULAR_FIRMWARE=1 -DMODULE_VERSION=5 -DMODULE_FUNCTION=5 -DMODULE_INDEX=1 -DMODULE_DEPENDENCY=4,2,1000 -DMODULE_DEPENDENCY2=0,0,0 -D_WINSOCK_H -D_GNU_SOURCE -DLOG_MODULE_CATEGORY="\"app\""  -fno-exceptions -fno-rtti -fcheck-new -std=gnu++11 -c -o ../build/target/user/platform-10-msrc/jamscanner_run_avg.o src/jamscanner_run_avg.cpp
jamscanner_run_avg.ino:2:28: fatal error: InternetButton.h: No such file or directory
compilation terminated.
../build/module.mk:265: recipe for target '../build/target/user/platform-10-msrc/jamscanner_run_avg.o' failed
make[2]: *** [../build/target/user/platform-10-msrc/jamscanner_run_avg.o] Error 1
make[2]: Leaving directory '/firmware/user'
../../../build/recurse.mk:11: recipe for target 'user' failed
make[1]: *** [user] Error 2
make[1]: Leaving directory '/firmware/modules/electron/user-part'
../build/recurse.mk:11: recipe for target 'modules/electron/user-part' failed
make: *** [modules/electron/user-part] Error 2

Are you using Web IDE?
If so you can post a SHARE THIS REVISION link to let uns see how your project looks exactly.

But as it seems you are building for Electron, but the InternetButton is a Photon shield - is this intentional?

However, one thing you can try. Replace #include "InternetButton.h" with #include <InternetButton.h> and build again.
It’s not really the syntax that makes the difference but there seems to be an old glitch in Web IDE where the build environment doesn’t always realise when a library was imported on first try. But after a minor change like the one above it becomes aware of it.
After you have a successful build once, you can even revert to #include "InternetButton.h" and it should still build.

Hi

Yes, I have tried the “…” instead of < > with no luck.
I found that if I changed name of my code, then it is not visible in list of SW when including a library. Only the old SW name is visible. If I proceed with including to my old SW then my new SW code will have the included library.
Strange…so I started all over, blank SW, renamed it once, included the libraries I needed and then it compiled without errors.

1 Like