Compile errors - unclear as to cause

I made what I thought was a simple change to a program and now I’m getting a compile error. Haven’t a clue how to fix this. Any guidance would be greatly appreciated!

Intellisense just gets confused sometimes when trying to guess at the context of your project (a known bug / issue). A “Problem” is not the same as getting a compile error. I’m guessing you should be able to compile just fine - give it a shot.

Actually, the compile fails (many times) whereas other programs seem to compile fine. I’m doing something dumb, I suspect, and just can’t see it. Here’s the output from the compiler

Compiling code for electron
Targeting version: 0.7.0

Including:
    lib/SparkJson/src/ArduinoJson.h
    lib/SparkJson/src/DynamicJsonBuffer.h
    lib/SparkJson/src/IndentedPrint.h
    lib/SparkJson/src/JsonArray.h
    lib/SparkJson/src/JsonBuffer.h
    lib/SparkJson/src/JsonBufferAllocated.h
    lib/SparkJson/src/JsonObject.h
    lib/SparkJson/src/JsonPair.h
    lib/SparkJson/src/JsonParser.h
    lib/SparkJson/src/JsonPrintable.h
    lib/SparkJson/src/JsonVariant.h
    lib/SparkJson/src/JsonVariantContent.h
    lib/SparkJson/src/JsonVariantType.h
    lib/SparkJson/src/JsonWriter.h
    lib/SparkJson/src/List.h
    lib/SparkJson/src/ListConstIterator.h
    lib/SparkJson/src/ListIterator.h
    lib/SparkJson/src/ListNode.h
    lib/SparkJson/src/Prettyfier.h
    lib/SparkJson/src/Print.h
    lib/SparkJson/src/QuotedString.h
    lib/SparkJson/src/ReferenceType.h
    lib/SparkJson/src/SparkJson.h
    lib/SparkJson/src/StaticJsonBuffer.h
    lib/SparkJson/src/StringBuilder.h
    lib/SparkJson/examples/IndentedPrintExample/IndentedPrintExample.ino
    lib/SparkJson/examples/JsonGeneratorExample/JsonGeneratorExample.ino
    lib/SparkJson/examples/JsonParserExample/JsonParserExample.ino
    lib/SparkJson/examples/JsonServer/JsonServer.ino
    lib/SparkJson/src/my-core.ino
    src/GSCO2v2.ino
    lib/SparkJson/src/IndentedPrint.cpp
    lib/SparkJson/src/JsonArray.cpp
    lib/SparkJson/src/JsonBuffer.cpp
    lib/SparkJson/src/JsonObject.cpp
    lib/SparkJson/src/JsonParser.cpp
    lib/SparkJson/src/JsonVariant.cpp
    lib/SparkJson/src/List.cpp
    lib/SparkJson/src/Prettyfier.cpp
    lib/SparkJson/src/Print.cpp
    lib/SparkJson/src/QuotedString.cpp
    lib/SparkJson/src/SparkJson.cpp
    lib/SparkJson/src/StringBuilder.cpp
    project.properties
attempting to compile firmware 

Processing  lib/SparkJson/examples/IndentedPrintExample/IndentedPrintExample.ino
Processing  lib/SparkJson/examples/JsonGeneratorExample/JsonGeneratorExample.ino
Processing  lib/SparkJson/examples/JsonParserExample/JsonParserExample.ino
Processing  lib/SparkJson/examples/JsonServer/JsonServer.ino
Processing  lib/SparkJson/src/my-core.ino
Processing  src/GSCO2v2.ino
Checking library SparkJson...
Installing library SparkJson 0.0.2 to lib/SparkJson ...
Library SparkJson 0.0.2 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/GSCO2v2.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=0.7.0 -DRELEASE_BUILD -I./inc -I../wiring/inc -I../system/inc -I../services/inc -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/SparkJson/src -I. -MD -MP -MF ../build/target/user/platform-10-msrc/GSCO2v2.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,207 -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/GSCO2v2.o src/GSCO2v2.cpp
In file included from lib/SparkJson/src/./ArduinoJson.h:7:0,
                 from lib/SparkJson/src/SparkJson.h:13,
                 from src/GSCO2v2.ino:14:
lib/SparkJson/src/././DynamicJsonBuffer.h: In destructor 'ArduinoJson::DynamicJsonBuffer::~DynamicJsonBuffer()':
lib/SparkJson/src/././DynamicJsonBuffer.h:20:33: warning: deleting object of polymorphic class type 'ArduinoJson::DynamicJsonBuffer' which has non-virtual destructor might cause undefined behaviour [-Wdelete-non-virtual-dtor]
   ~DynamicJsonBuffer() { delete _next; }
                                 ^
src/GSCO2v2.ino: In function 'void loop()':
src/GSCO2v2.ino:109:29: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   if ((gNow - gLastPublish) >= gPublishPeriod) {
                             ^
src/GSCO2v2.ino: In function 'void updateDeviceInfo()':
src/GSCO2v2.ino:143:11: warning: format '%i' expects argument of type 'int', but argument 8 has type 'double' [-Wformat=]
           );
           ^
src/GSCO2v2.ino:143:11: warning: format '%i' expects argument of type 'int', but argument 8 has type 'double' [-Wformat=]
src/GSCO2v2.ino: In function 'bool readSensor()':
src/GSCO2v2.ino:192:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   for(i=0; i<sizeof(cmd_get_sensor); i++)
             ^
src/GSCO2v2.ino: In function 'int calibrate(String)':
src/GSCO2v2.ino:225:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
      for (int i=0;i<sizeof(cmd_calibrate);i++)
                    ^

Building cpp file: lib/SparkJson/src/JsonVariant.cpp
Invoking: ARM GCC CPP Compiler
mkdir -p ../build/target/user/platform-10-mSparkJson/src/
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=0.7.0 -DRELEASE_BUILD -I./inc -I../wiring/inc -I../system/inc -I../services/inc -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/SparkJson/src -I. -MD -MP -MF ../build/target/user/platform-10-mSparkJson/src/JsonVariant.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,207 -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-mSparkJson/src/JsonVariant.o lib/SparkJson/src/JsonVariant.cpp

Building cpp file: lib/SparkJson/src/StringBuilder.cpp
Invoking: ARM GCC CPP Compiler
mkdir -p ../build/target/user/platform-10-mSparkJson/src/
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=0.7.0 -DRELEASE_BUILD -I./inc -I../wiring/inc -I../system/inc -I../services/inc -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/SparkJson/src -I. -MD -MP -MF ../build/target/user/platform-10-mSparkJson/src/StringBuilder.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_PLATFOR
Error: Command failed: /Users/tom/.vscode/extensions/particle.particle-vscode-core-1.4.3/src/cli/bin/darwin/amd64/particle cloud compile electron --target 0.7.0


Compiling code for electron
Targeting version: 0.7.0

Including:
    lib/SparkJson/src/ArduinoJson.h
    lib/SparkJson/src/DynamicJsonBuffer.h
    lib/SparkJson/src/IndentedPrint.h
    lib/SparkJson/src/JsonArray.h
    lib/SparkJson/src/JsonBuffer.h
    lib/SparkJson/src/JsonBufferAllocated.h
    lib/SparkJson/src/JsonObject.h
    lib/SparkJson/src/JsonPair.h
    lib/SparkJson/src/JsonParser.h
    lib/SparkJson/src/JsonPrintable.h
    lib/SparkJson/src/JsonVariant.h
    lib/SparkJson/src/JsonVariantContent.h
    lib/SparkJson/src/JsonVariantType.h
    lib/SparkJson/src/JsonWriter.h
    lib/SparkJson/src/List.h
    lib/SparkJson/src/ListConstIterator.h
    lib/SparkJson/src/ListIterator.h
    lib/SparkJson/src/ListNode.h
    lib/SparkJson/src/Prettyfier.h
    lib/SparkJson/src/Print.h
    lib/SparkJson/src/QuotedString.h
    lib/SparkJson/src/ReferenceType.h
    lib/SparkJson/src/SparkJson.h
    lib/SparkJson/src/StaticJsonBuffer.h
    lib/SparkJson/src/StringBuilder.h
    lib/SparkJson/examples/IndentedPrintExample/IndentedPrintExample.ino
    lib/SparkJson/examples/JsonGeneratorExample/JsonGeneratorExample.ino
    lib/SparkJson/examples/JsonParserExample/JsonParserExample.ino
    lib/SparkJson/examples/JsonServer/JsonServer.ino
    lib/SparkJson/src/my-core.ino
    src/GSCO2v2.ino
    lib/SparkJson/src/IndentedPrint.cpp
    lib/SparkJson/src/JsonArray.cpp
    lib/SparkJson/src/JsonBuffer.cpp
    lib/SparkJson/src/JsonObject.cpp
    lib/SparkJson/src/JsonParser.cpp
    lib/SparkJson/src/JsonVariant.cpp
    lib/SparkJson/src/List.cpp
    lib/SparkJson/src/Prettyfier.cpp
    lib/SparkJson/src/Print.cpp
    lib/SparkJson/src/QuotedString.cpp
    lib/SparkJson/src/SparkJson.cpp
    lib/SparkJson/src/StringBuilder.cpp
    project.properties
attempting to compile firmware 

Processing  lib/SparkJson/examples/IndentedPrintExample/IndentedPrintExample.ino
Processing  lib/SparkJson/examples/JsonGeneratorExample/JsonGeneratorExample.ino
Processing  lib/SparkJson/examples/JsonParserExample/JsonParserExample.ino
Processing  lib/SparkJson/examples/JsonServer/JsonServer.ino
Processing  lib/SparkJson/src/my-core.ino
Processing  src/GSCO2v2.ino
Checking library SparkJson...
Installing library SparkJson 0.0.2 to lib/SparkJson ...
Library SparkJson 0.0.2 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/GSCO2v2.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=0.7.0 -DRELEASE_BUILD -I./inc -I../wiring/inc -I../system/inc -I../services/inc -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/SparkJson/src -I. -MD -MP -MF ../build/target/user/platform-10-msrc/GSCO2v2.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,207 -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/GSCO2v2.o src/GSCO2v2.cpp
In file included from lib/SparkJson/src/./ArduinoJson.h:7:0,
                 from lib/SparkJson/src/SparkJson.h:13,
                 from src/GSCO2v2.ino:14:
lib/SparkJson/src/././DynamicJsonBuffer.h: In destructor 'ArduinoJson::DynamicJsonBuffer::~DynamicJsonBuffer()':
lib/SparkJson/src/././DynamicJsonBuffer.h:20:33: warning: deleting object of polymorphic class type 'ArduinoJson::DynamicJsonBuffer' which has non-virtual destructor might cause undefined behaviour [-Wdelete-non-virtual-dtor]
   ~DynamicJsonBuffer() { delete _next; }
                                 ^
src/GSCO2v2.ino: In function 'void loop()':
src/GSCO2v2.ino:109:29: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   if ((gNow - gLastPublish) >= gPublishPeriod) {
                             ^
src/GSCO2v2.ino: In function 'void updateDeviceInfo()':
src/GSCO2v2.ino:143:11: warning: format '%i' expects argument of type 'int', but argument 8 has type 'double' [-Wformat=]
           );
           ^
src/GSCO2v2.ino:143:11: warning: format '%i' expects argument of type 'int', but argument 8 has type 'double' [-Wformat=]
src/GSCO2v2.ino: In function 'bool readSensor()':
src/GSCO2v2.ino:192:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   for(i=0; i<sizeof(cmd_get_sensor); i++)
             ^
src/GSCO2v2.ino: In function 'int calibrate(String)':
src/GSCO2v2.ino:225:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
      for (int i=0;i<sizeof(cmd_calibrate);i++)
                    ^

Building cpp file: lib/SparkJson/src/JsonVariant.cpp
Invoking: ARM GCC CPP Compiler
mkdir -p ../build/target/user/platform-10-mSparkJson/src/
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=0.7.0 -DRELEASE_BUILD -I./inc -I../wiring/inc -I../system/inc -I../services/inc -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/SparkJson/src -I. -MD -MP -MF ../build/target/user/platform-10-mSparkJson/src/JsonVariant.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,207 -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-mSparkJson/src/JsonVariant.o lib/SparkJson/src/JsonVariant.cpp

Building cpp file: lib/SparkJson/src/StringBuilder.cpp
Invoking: ARM GCC CPP Compiler
mkdir -p ../build/target/user/platform-10-mSparkJson/src/
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=0.7.0 -DRELEASE_BUILD -I./inc -I../wiring/inc -I../system/inc -I../services/inc -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/SparkJson/src -I. -MD -MP -MF ../build/target/user/platform-10-mSparkJson/src/StringBuilder.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_PLATFOR
	at makeError (/Users/tom/.vscode/extensions/particle.particle-vscode-core-1.4.3/node_modules/execa/index.js:174:9)
	at module.exports.Promise.all.then.arr (/Users/tom/.vscode/extensions/particle.particle-vscode-core-1.4.3/node_modules/execa/index.js:278:16)

- - - -

Rebuilding the Intellisense database cleared up the “problems”. However, I still cannot compile.

The bottom two lines from above appear to point to problems:

at makeError (/Users/tom/.vscode/extensions/particle.particle-vscode-core-1.4.3/node_modules/execa/index.js:174:9)

   at module.exports.Promise.all.then.arr (/Users/tom/.vscode/extensions/particle.particle-vscode-core-1.4.3/node_modules/execa/index.js:278:16)

Your list of included files features a bunch of .ino files - a project is only allowed one .ino file and it’s also not allowed that included files redefine void setup() and/or void loop().
The common culprits are the examples folders that come with your imported libraries.
Just remove all of these before you build your project.

Thanks, @ScruffR. As always, you’re amazingly helpful. I deleted all of the example files and not luck. When looking back through the log listing, I also found core.ino in the list. It was in the library src folder. With some hesitancy, I deleted it. It’s now compiling, but I haven’t a clue if it will work.

I’m wondering why I started having this problem. I install(ed) the library to the project, assuming that’s a requirement. Is that the correct practice?

Yes, for a local build you need to install the libraries, but the issue with multiple .ino files and the examples folder is a long standing one we already know from CLI cloud builds.

I have talked to @m_m about that but haven’t really seen it addressed so far.

BTW, if you are opting for a cloud build with Workbench you will probably not run into that issue, but on the other hand may find that any local changes (eventually) made to the libraries won’t be applied as a cloud build will rather use the cloud version of these libraries unless you deactivate the dependencies in project.properties.

As you were typing, I deleted the SparkJson library folder and successfully compiled the project. I’m not sure what inspired me to add the library, but I was in a bit of a panic mode, trying to resolve the issue(s) with Intellisense which likely led me to create the compile problems. I normally use cloud compile to keep things simple and will continue to do so.

Again, thank you for your continued support.

1 Like