Compiler error when new tab is added

I dont understand why adding a tab is causing an issue with existing code that works. Sorry thats not very clear, however here is the issue.

I have a multi-tab sketch to ping a target and generate statistics. It works fine.

However when I add another tab FS.ino (from the Littlefs_test example) (shown below) I get errors such as

undefined reference to `amb(bool)'

which is defined in hardio.ino and prototyped in the main tab.

Sorry this is long, but I've included all the error list and the offending tabs.

If I hide the FS.ino tab by moving the code to another folder - without making ANY other changes - the error goes away.


FQBN: esp32:esp32:esp32da
Using board 'esp32da' from platform in folder: C:\Users\johnl\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.1
Using core 'esp32' from platform in folder: C:\Users\johnl\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.1

cmd /c if exist "C:\\Arduino2\\sketchbook\\ESP32\\esp32_weblights_V1_2\\partitions.csv" COPY /y "C:\\Arduino2\\sketchbook\\ESP32\\esp32_weblights_V1_2\\partitions.csv" "C:\\Users\\johnl\\AppData\\Local\\arduino\\sketches\\AF0B714BBE955ECED64F2C344BD4FADF\\partitions.csv"
cmd /c if not exist "C:\\Users\\johnl\\AppData\\Local\\arduino\\sketches\\AF0B714BBE955ECED64F2C344BD4FADF\\partitions.csv" if exist "C:\\Users\\johnl\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.1.1\\variants\\esp32da\\partitions.csv" COPY "C:\\Users\\johnl\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.1.1\\variants\\esp32da\\partitions.csv" "C:\\Users\\johnl\\AppData\\Local\\arduino\\sketches\\AF0B714BBE955ECED64F2C344BD4FADF\\partitions.csv"
cmd /c if not exist "C:\\Users\\johnl\\AppData\\Local\\arduino\\sketches\\AF0B714BBE955ECED64F2C344BD4FADF\\partitions.csv" COPY "C:\\Users\\johnl\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.1.1\\tools\\partitions\\default.csv" "C:\\Users\\johnl\\AppData\\Local\\arduino\\sketches\\AF0B714BBE955ECED64F2C344BD4FADF\\partitions.csv"
cmd /c IF EXIST "C:\\Arduino2\\sketchbook\\ESP32\\esp32_weblights_V1_2\\bootloader.bin" ( COPY /y "C:\\Arduino2\\sketchbook\\ESP32\\esp32_weblights_V1_2\\bootloader.bin" "C:\\Users\\johnl\\AppData\\Local\\arduino\\sketches\\AF0B714BBE955ECED64F2C344BD4FADF\\esp32_weblights_V1_2.ino.bootloader.bin" ) ELSE ( IF EXIST "C:\\Users\\johnl\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.1.1\\variants\\esp32da\\bootloader.bin" ( COPY "C:\\Users\\johnl\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.1.1\\variants\\esp32da\\bootloader.bin" "C:\\Users\\johnl\\AppData\\Local\\arduino\\sketches\\AF0B714BBE955ECED64F2C344BD4FADF\\esp32_weblights_V1_2.ino.bootloader.bin" ) ELSE ( "C:\\Users\\johnl\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esptool_py\\4.9.dev3\\esptool.exe" --chip esp32 elf2image --flash_mode dio --flash_freq 80m --flash_size 4MB -o "C:\\Users\\johnl\\AppData\\Local\\arduino\\sketches\\AF0B714BBE955ECED64F2C344BD4FADF\\esp32_weblights_V1_2.ino.bootloader.bin" "C:\\Users\\johnl\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esp32-arduino-libs\\idf-release_v5.3-cfea4f7c-v1\\esp32\\bin\\bootloader_qio_80m.elf" ) )
esptool.py v4.8.1
Creating esp32 image...
Merged 2 ELF sections
Successfully created esp32 image.
cmd /c if exist "C:\\Arduino2\\sketchbook\\ESP32\\esp32_weblights_V1_2\\build_opt.h" COPY /y "C:\\Arduino2\\sketchbook\\ESP32\\esp32_weblights_V1_2\\build_opt.h" "C:\\Users\\johnl\\AppData\\Local\\arduino\\sketches\\AF0B714BBE955ECED64F2C344BD4FADF\\build_opt.h"
cmd /c if not exist "C:\\Users\\johnl\\AppData\\Local\\arduino\\sketches\\AF0B714BBE955ECED64F2C344BD4FADF\\build_opt.h" type nul > "C:\\Users\\johnl\\AppData\\Local\\arduino\\sketches\\AF0B714BBE955ECED64F2C344BD4FADF\\build_opt.h"
cmd /c type nul > "C:\\Users\\johnl\\AppData\\Local\\arduino\\sketches\\AF0B714BBE955ECED64F2C344BD4FADF/file_opts"
cmd /c COPY /y "C:\\Users\\johnl\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esp32-arduino-libs\\idf-release_v5.3-cfea4f7c-v1\\esp32\\sdkconfig" "C:\\Users\\johnl\\AppData\\Local\\arduino\\sketches\\AF0B714BBE955ECED64F2C344BD4FADF\\sdkconfig"
        1 file(s) copied.
Detecting libraries used...
C:\Users\johnl\AppData\Local\Arduino15\packages\esp32\tools\esp-x32\2405/bin/xtensa-esp32-elf-g++ -c @C:\Users\johnl\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.3-cfea4f7c-v1\esp32/flags/cpp_flags -w -Og -g3 -Werror=return-type -w -x c++ -E -CC -DF_CPU=240000000L -DARDUINO=10607 -DARDUINO_ESP32_WROOM_DA -DARDUINO_ARCH_ESP32 -DARDUINO_BOARD="ESP32_WROOM_DA" -DARDUINO_VARIANT="esp32da" -DARDUINO_PARTITION_default -DARDUINO_HOST_OS="windows" -DARDUINO_FQBN="esp32:esp32:esp32da:UploadSpeed=921600,CPUFreq=240,FlashFreq=80,FlashMode=qio,FlashSize=4M,PartitionScheme=default,DebugLevel=none,LoopCore=1,EventsCore=1,EraseFlash=none" -DESP32=ESP32 -DCORE_DEBUG_LEVEL=0 -DARDUINO_RUNNING_CORE=1 -DARDUINO_EVENT_RUNNING_CORE=1 -DARDUINO_USB_CDC_ON_BOOT=0 @C:\Users\johnl\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.3-cfea4f7c-v1\esp32/flags/defines -IC:\Arduino2\sketchbook\ESP32\esp32_weblights_V1_2 -iprefix C:\Users\johnl\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.3-cfea4f7c-v1\esp32/include/ @C:\Users\johnl\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.3-cfea4f7c-v1\esp32/flags/includes -IC:\Users\johnl\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.3-cfea4f7c-v1\esp32/qio_qspi/include -IC:\Users\johnl\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.1\cores\esp32 -IC:\Users\johnl\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.1\variants\esp32da @C:\Users\johnl\AppData\Local\arduino\sketches\AF0B714BBE955ECED64F2C344BD4FADF/build_opt.h @C:\Users\johnl\AppData\Local\arduino\sketches\AF0B714BBE955ECED64F2C344BD4FADF/file_opts C:\Users\johnl\AppData\Local\arduino\sketches\AF0B714BBE955ECED64F2C344BD4FADF\sketch\esp32_weblights_V1_2.ino.cpp -o nul
Alternatives for WiFi.h: [WiFi@3.1.1]
ResolveLibrary(WiFi.h)
  -> candidates: [WiFi@3.1.1]
C:\Users\johnl\AppData\Local\Arduino15\packages\esp32\tools\esp-x32\2405/bin/xtensa-esp32-elf-g++ -c @C:\Users\johnl\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.3-cfea4f7c-v1\esp32/flags/cpp_flags -w -Og -g3 -Werror=return-type -w -x c++ -E -CC -DF_CPU=240000000L -DARDUINO=10607 -DARDUINO_ESP32_WROOM_DA -DARDUINO_ARCH_ESP32 -DARDUINO_BOARD="ESP32_WROOM_DA" -DARDUINO_VARIANT="esp32da" -DARDUINO_PARTITION_default -DARDUINO_HOST_OS="windows" -DARDUINO_FQBN="esp32:esp32:esp32da:UploadSpeed=921600,CPUFreq=240,FlashFreq=80,FlashMode=qio,FlashSize=4M,PartitionScheme=default,DebugLevel=none,LoopCore=1,EventsCore=1,EraseFlash=none" -DESP32=ESP32 -DCORE_DEBUG_LEVEL=0 -DARDUINO_RUNNING_CORE=1 -DARDUINO_EVENT_RUNNING_CORE=1 -DARDUINO_USB_CDC_ON_BOOT=0 @C:\Users\johnl\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.3-cfea4f7c-v1\esp32/flags/defines -IC:\Arduino2\sketchbook\ESP32\esp32_weblights_V1_2 -iprefix C:\Users\johnl\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.3-cfea4f7c-v1\esp32/include/ @C:\Users\johnl\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.3-cfea4f7c-v1\esp32/flags/includes -IC:\Users\johnl\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.3-cfea4f7c-v1\esp32/qio_qspi/include -IC:\Users\johnl\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.1\cores\esp32 -IC:\Users\johnl\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.1\variants\esp32da -IC:\Users\johnl\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.1\libraries\WiFi\src @C:\Users\johnl\AppData\Local\arduino\sketches\AF0B714BBE955ECED64F2C344BD4FADF/build_opt.h @C:\Users\johnl\AppData\Local\arduino\sketches\AF0B714BBE955ECED64F2C344BD4FADF/file_opts C:\Users\johnl\AppData\Local\arduino\sketches\AF0B714BBE955ECED64F2C344BD4FADF\sketch\esp32_weblights_V1_2.ino.cpp -o nul
Alternatives for Network.h: [Networking@3.1.1]
ResolveLibrary(Network.h)
  -> candidates: [Networking@3.1.1]
C:\Users\johnl\AppData\Local\Arduino15\packages\esp32\tools\esp-x32\2405/bin/xtensa-esp32-elf-g++ -c @C:\Users\johnl\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.3-cfea4f7c-v1\esp32/flags/cpp_flags -w -Og -g3 -Werror=return-type -w -x c++ -E -CC -DF_CPU=240000000L -DARDUINO=10607 -DARDUINO_ESP32_WROOM_DA -DARDUINO_ARCH_ESP32 -DARDUINO_BOARD="ESP32_WROOM_DA" -DARDUINO_VARIANT="esp32da" -DARDUINO_PARTITION_default -DARDUINO_HOST_OS="windows" -DARDUINO_FQBN="esp32:esp32:esp32da:UploadSpeed=921600,CPUFreq=240,FlashFreq=80,FlashMode=qio,FlashSize=4M,PartitionScheme=default,DebugLevel=none,LoopCore=1,EventsCore=1,EraseFlash=none" -DESP32=ESP32 -DCORE_DEBUG_LEVEL=0 -DARDUINO_RUNNING_CORE=1 -DARDUINO_EVENT_RUNNING_CORE=1 -DARDUINO_USB_CDC_ON_BOOT=0 @C:\Users\johnl\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.3-cfea4f7c-v1\esp32/flags/defines -IC:\Arduino2\sketchbook\ESP32\esp32_weblights_V1_2 -iprefix C:\Users\johnl\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.3-cfea4f7c-v1\esp32/include/ @C:\Users\johnl\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.3-cfea4f7c-v1\esp32/flags/includes -IC:\Users\johnl\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.3-cfea4f7c-v1\esp32/qio_qspi/include -IC:\Users\johnl\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.1\cores\esp32 -IC:\Users\johnl\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.1\variants\esp32da -IC:\Users\johnl\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.1\libraries\WiFi\src -IC:\Users\johnl\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.1\libraries\Network\src @C:\Users\johnl\AppData\Local\arduino\sketches\AF0B714BBE955ECED64F2C344BD4FADF/build_opt.h @C:\Users\johnl\AppData\Local\arduino\sketches\AF0B714BBE955ECED64F2C344BD4FADF/file_opts C:\Users\johnl\AppData\Local\arduino\sketches\AF0B714BBE955ECED64F2C344BD4FADF\sketch\esp32_weblights_V1_2.ino.cpp -o nul
Alternatives for Preferences.h: [Preferences@3.1.1]
ResolveLibrary(Preferences.h)
  -> candidates: [Preferences@3.1.1]
C:\Users\johnl\AppData\Local\Arduino15\packages\esp32\tools\esp-x32\2405/bin/xtensa-esp32-elf-g++ -c @C:\Users\johnl\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.3-cfea4f7c-v1\esp32/flags/cpp_flags -w -Og -g3 -Werror=return-type -w -x c++ -E -CC -DF_CPU=240000000L -DARDUINO=10607 -DARDUINO_ESP32_WROOM_DA -DARDUINO_ARCH_ESP32 -DARDUINO_BOARD="ESP32_WROOM_DA" -DARDUINO_VARIANT="esp32da" -DARDUINO_PARTITION_default -DARDUINO_HOST_OS="windows" -DARDUINO_FQBN="esp32:esp32:esp32da:UploadSpeed=921600,CPUFreq=240,FlashFreq=80,FlashMode=qio,FlashSize=4M,PartitionScheme=default,DebugLevel=none,LoopCore=1,EventsCore=1,EraseFlash=none" -DESP32=ESP32 -DCORE_DEBUG_LEVEL=0 -DARDUINO_RUNNING_CORE=1 -DARDUINO_EVENT_RUNNING_CORE=1 -DARDUINO_USB_CDC_ON_BOOT=0 @C:\Users\johnl\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.3-cfea4f7c-v1\esp32/flags/defines -IC:\Arduino2\sketchbook\ESP32\esp32_weblights_V1_2 -iprefix C:\Users\johnl\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.3-cfea4f7c-v1\esp32/include/ @C:\Users\johnl\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.3-cfea4f7c-v1\esp32/flags/includes -IC:\Users\johnl\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.3-cfea4f7c-v1\esp32/qio_qspi/include -IC:\Users\johnl\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.1\cores\esp32 -IC:\Users\johnl\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.1\variants\esp32da -IC:\Users\johnl\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.1\libraries\WiFi\src -IC:\Users\johnl\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.1\libraries\Network\src -IC:\Users\johnl\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.1\libraries\Preferences\src @C:\Users\johnl\AppData\Local\arduino\sketches\AF0B714BBE955ECED64F2C344BD4FADF/build_opt.h @C:\Users\johnl\AppData\Local\arduino\sketches\AF0B714BBE955ECED64F2C344BD4FADF/file_opts C:\Users\johnl\AppData\Local\arduino\sketches\AF0B714BBE955ECED64F2C344BD4FADF\sketch\esp32_weblights_V1_2.ino.cpp -o nul
Alternatives for FS.h: [FS@3.1.1]
ResolveLibrary(FS.h)
  -> candidates: [FS@3.1.1]
C:\Users\johnl\AppData\Local\Arduino15\packages\esp32\tools\esp-x32\2405/bin/xtensa-esp32-elf-g++ -c @C:\Users\johnl\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.3-cfea4f7c-v1\esp32/flags/cpp_flags -w -Og -g3 -Werror=return-type -w -x c++ -E -CC -DF_CPU=240000000L -DARDUINO=10607 -DARDUINO_ESP32_WROOM_DA -DARDUINO_ARCH_ESP32 -DARDUINO_BOARD="ESP32_WROOM_DA" -DARDUINO_VARIANT="esp32da" -DARDUINO_PARTITION_default -DARDUINO_HOST_OS="windows" -DARDUINO_FQBN="esp32:esp32:esp32da:UploadSpeed=921600,CPUFreq=240,FlashFreq=80,FlashMode=qio,FlashSize=4M,PartitionScheme=default,DebugLevel=none,LoopCore=1,EventsCore=1,EraseFlash=none" -DESP32=ESP32 -DCORE_DEBUG_LEVEL=0 -DARDUINO_RUNNING_CORE=1 -DARDUINO_EVENT_RUNNING_CORE=1 -DARDUINO_USB_CDC_ON_BOOT=0 @C:\Users\johnl\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.3-cfea4f7c-v1\esp32/flags/defines -IC:\Arduino2\sketchbook\ESP32\esp32_weblights_V1_2 -iprefix C:\Users\johnl\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.3-cfea4f7c-v1\esp32/include/ @C:\Users\johnl\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.3-cfea4f7c-v1\esp32/flags/includes -IC:\Users\johnl\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.3-cfea4f7c-v1\esp32/qio_qspi/include -IC:\Users\johnl\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.1\cores\esp32 -IC:\Users\johnl\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.1\variants\esp32da -IC:\Users\johnl\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.1\libraries\WiFi\src -IC:\Users\johnl\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.1\libraries\Network\src -IC:\Users\johnl\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.1\libraries\Preferences\src -IC:\Users\johnl\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.1\libraries\FS\src @C:\Users\johnl\AppData\Local\arduino\sketches\AF0B714BBE955ECED64F2C344BD4FADF/build_opt.h @C:\Users\johnl\AppData\Local\arduino\sketches\AF0B714BBE955ECED64F2C344BD4FADF/file_opts C:\Users\johnl\AppData\Local\arduino\sketches\AF0B714BBE955ECED64F2C344BD4FADF\sketch\esp32_weblights_V1_2.ino.cpp -o nul
Alternatives for LittleFS.h: [LittleFS@3.1.1]
ResolveLibrary(LittleFS.h)
  -> candidates: [LittleFS@3.1.1]
C:\Users\johnl\AppData\Local\Arduino15\packages\esp32\tools\esp-x32\2405/bin/xtensa-esp32-elf-g++ -c @C:\Users\johnl\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.3-cfea4f7c-v1\esp32/flags/cpp_flags -w -Og -g3 -Werror=return-type -w -x c++ -E -CC -DF_CPU=240000000L -DARDUINO=10607 -DARDUINO_ESP32_WROOM_DA -DARDUINO_ARCH_ESP32 -DARDUINO_BOARD="ESP32_WROOM_DA" -DARDUINO_VARIANT="esp32da" -DARDUINO_PARTITION_default -DARDUINO_HOST_OS="windows" -DARDUINO_FQBN="esp32:esp32:esp32da:UploadSpeed=921600,CPUFreq=240,FlashFreq=80,FlashMode=qio,FlashSize=4M,PartitionScheme=default,DebugLevel=none,LoopCore=1,EventsCore=1,EraseFlash=none" -DESP32=ESP32 -DCORE_DEBUG_LEVEL=0 -DARDUINO_RUNNING_CORE=1 -DARDUINO_EVENT_RUNNING_CORE=1 -DARDUINO_USB_CDC_ON_BOOT=0 @C:\Users\johnl\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.3-cfea4f7c-v1\esp32/flags/defines -IC:\Arduino2\sketchbook\ESP32\esp32_weblights_V1_2 -iprefix C:\Users\johnl\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.3-cfea4f7c-v1\esp32/include/ @C:\Users\johnl\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.3-cfea4f7c-v1\esp32/flags/includes -IC:\Users\johnl\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.3-cfea4f7c-v1\esp32/qio_qspi/include -IC:\Users\johnl\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.1\cores\esp32 -IC:\Users\johnl\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.1\variants\esp32da -IC:\Users\johnl\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.1\libraries\WiFi\src -IC:\Users\johnl\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.1\libraries\Network\src -IC:\Users\johnl\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.1\libraries\Preferences\src -IC:\Users\johnl\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.1\libraries\FS\src -IC:\Users\johnl\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.1\libraries\LittleFS\src @C:\Users\johnl\AppData\Local\arduino\sketches\AF0B714BBE955ECED64F2C344BD4FADF/build_opt.h @C:\Users\johnl\AppData\Local\arduino\sketches\AF0B714BBE955ECED64F2C344BD4FADF/file_opts C:\Users\johnl\AppData\Local\arduino\sketches\AF0B714BBE955ECED64F2C344BD4FADF\sketch\esp32_weblights_V1_2.ino.cpp -o nul
Alternatives for ESP32Ping.h: [ESP32Ping@1.7]
ResolveLibrary(ESP32Ping.h)
  -> candidates: [ESP32Ping@1.7]
C:\Users\johnl\AppData\Local\Arduino15\packages\esp32\tools\esp-x32\2405/bin/xtensa-esp32-elf-g++ -c @C:\Users\johnl\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.3-cfea4f7c-v1\esp32/flags/cpp_flags -w -Og -g3 -Werror=return-type -w -x c++ -E -CC -DF_CPU=240000000L -DARDUINO=10607 -DARDUINO_ESP32_WROOM_DA -DARDUINO_ARCH_ESP32 -DARDUINO_BOARD="ESP32_WROOM_DA" -DARDUINO_VARIANT="esp32da" -DARDUINO_PARTITION_default -DARDUINO_HOST_OS="windows" -DARDUINO_FQBN="esp32:esp32:esp32da:UploadSpeed=921600,CPUFreq=240,FlashFreq=80,FlashMode=qio,FlashSize=4M,PartitionScheme=default,DebugLevel=none,LoopCore=1,EventsCore=1,EraseFlash=none" -DESP32=ESP32 -DCORE_DEBUG_LEVEL=0 -DARDUINO_RUNNING_CORE=1 -DARDUINO_EVENT_RUNNING_CORE=1 -DARDUINO_USB_CDC_ON_BOOT=0 @C:\Users\johnl\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.3-cfea4f7c-v1\esp32/flags/defines -IC:\Arduino2\sketchbook\ESP32\esp32_weblights_V1_2 -iprefix C:\Users\johnl\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.3-cfea4f7c-v1\esp32/include/ @C:\Users\johnl\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.3-cfea4f7c-v1\esp32/flags/includes -IC:\Users\johnl\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.3-cfea4f7c-v1\esp32/qio_qspi/include -IC:\Users\johnl\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.1\cores\esp32 -IC:\Users\johnl\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.1\variants\esp32da -IC:\Users\johnl\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.1\libraries\WiFi\src -IC:\Users\johnl\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.1\libraries\Network\src -IC:\Users\johnl\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.1\libraries\Preferences\src -IC:\Users\johnl\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.1\libraries\FS\src -IC:\Users\johnl\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.1\libraries\LittleFS\src -Ic:\Arduino2\sketchbook\libraries\ESP32Ping-master @C:\Users\johnl\AppData\Local\arduino\sketches\AF0B714BBE955ECED64F2C344BD4FADF/build_opt.h @C:\Users\johnl\AppData\Local\arduino\sketches\AF0B714BBE955ECED64F2C344BD4FADF/file_opts C:\Users\johnl\AppData\Local\arduino\sketches\AF0B714BBE955ECED64F2C344BD4FADF\sketch\esp32_weblights_V1_2.ino.cpp -o nul
Using cached library dependencies for file: C:\Users\johnl\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.1\libraries\WiFi\src\AP.cpp
Using cached library dependencies for file: C:\Users\johnl\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.1\libraries\WiFi\src\STA.cpp
Using cached library dependencies for file: C:\Users\johnl\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.1\libraries\WiFi\src\WiFi.cpp
Using cached library dependencies for file: C:\Users\johnl\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.1\libraries\WiFi\src\WiFiAP.cpp
Using cached library dependencies for file: C:\Users\johnl\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.1\libraries\WiFi\src\WiFiGeneric.cpp
Using cached library dependencies for file: C:\Users\johnl\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.1\libraries\WiFi\src\WiFiMulti.cpp
Using cached library dependencies for file: C:\Users\johnl\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.1\libraries\WiFi\src\WiFiSTA.cpp
Using cached library dependencies for file: C:\Users\johnl\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.1\libraries\WiFi\src\WiFiScan.cpp
Using cached library dependencies for file: C:\Users\johnl\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.1\libraries\Network\src\NetworkClient.cpp
Using cached library dependencies for file: C:\Users\johnl\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.1\libraries\Network\src\NetworkEvents.cpp
Using cached library dependencies for file: C:\Users\johnl\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.1\libraries\Network\src\NetworkInterface.cpp
Using cached library dependencies for file: C:\Users\johnl\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.1\libraries\Network\src\NetworkManager.cpp
Using cached library dependencies for file: C:\Users\johnl\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.1\libraries\Network\src\NetworkServer.cpp
Using cached library dependencies for file: C:\Users\johnl\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.1\libraries\Network\src\NetworkUdp.cpp
Using cached library dependencies for file: C:\Users\johnl\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.1\libraries\Preferences\src\Preferences.cpp
Using cached library dependencies for file: C:\Users\johnl\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.1\libraries\FS\src\FS.cpp
Using cached library dependencies for file: C:\Users\johnl\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.1\libraries\FS\src\vfs_api.cpp
Using cached library dependencies for file: C:\Users\johnl\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.1\libraries\LittleFS\src\LittleFS.cpp
Using cached library dependencies for file: c:\Arduino2\sketchbook\libraries\ESP32Ping-master\ESP32Ping.cpp
Using cached library dependencies for file: c:\Arduino2\sketchbook\libraries\ESP32Ping-master\ping.cpp
Generating function prototypes...
C:\Users\johnl\AppData\Local\Arduino15\packages\esp32\tools\esp-x32\2405/bin/xtensa-esp32-elf-g++ -c @C:\Users\johnl\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.3-cfea4f7c-v1\esp32/flags/cpp_flags -w -Og -g3 -Werror=return-type -w -x c++ -E -CC -DF_CPU=240000000L -DARDUINO=10607 -DARDUINO_ESP32_WROOM_DA -DARDUINO_ARCH_ESP32 -DARDUINO_BOARD="ESP32_WROOM_DA" -DARDUINO_VARIANT="esp32da" -DARDUINO_PARTITION_default -DARDUINO_HOST_OS="windows" -DARDUINO_FQBN="esp32:esp32:esp32da:UploadSpeed=921600,CPUFreq=240,FlashFreq=80,FlashMode=qio,FlashSize=4M,PartitionScheme=default,DebugLevel=none,LoopCore=1,EventsCore=1,EraseFlash=none" -DESP32=ESP32 -DCORE_DEBUG_LEVEL=0 -DARDUINO_RUNNING_CORE=1 -DARDUINO_EVENT_RUNNING_CORE=1 -DARDUINO_USB_CDC_ON_BOOT=0 @C:\Users\johnl\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.3-cfea4f7c-v1\esp32/flags/defines -IC:\Arduino2\sketchbook\ESP32\esp32_weblights_V1_2 -iprefix C:\Users\johnl\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.3-cfea4f7c-v1\esp32/include/ @C:\Users\johnl\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.3-cfea4f7c-v1\esp32/flags/includes -IC:\Users\johnl\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.3-cfea4f7c-v1\esp32/qio_qspi/include -IC:\Users\johnl\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.1\cores\esp32 -IC:\Users\johnl\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.1\variants\esp32da -IC:\Users\johnl\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.1\libraries\WiFi\src -IC:\Users\johnl\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.1\libraries\Network\src -IC:\Users\johnl\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.1\libraries\Preferences\src -IC:\Users\johnl\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.1\libraries\FS\src -IC:\Users\johnl\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.1\libraries\LittleFS\src -Ic:\Arduino2\sketchbook\libraries\ESP32Ping-master @C:\Users\johnl\AppData\Local\arduino\sketches\AF0B714BBE955ECED64F2C344BD4FADF/build_opt.h @C:\Users\johnl\AppData\Local\arduino\sketches\AF0B714BBE955ECED64F2C344BD4FADF/file_opts C:\Users\johnl\AppData\Local\arduino\sketches\AF0B714BBE955ECED64F2C344BD4FADF\sketch\esp32_weblights_V1_2.ino.cpp -o C:\Users\johnl\AppData\Local\Temp\986387590\sketch_merged.cpp
C:\Users\johnl\AppData\Local\Arduino15\packages\builtin\tools\ctags\5.8-arduino11/ctags -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives C:\Users\johnl\AppData\Local\Temp\986387590\sketch_merged.cpp
Compiling sketch...
"C:\\Users\\johnl\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esp-x32\\2405/bin/xtensa-esp32-elf-g++" -MMD -c "@C:\\Users\\johnl\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esp32-arduino-libs\\idf-release_v5.3-cfea4f7c-v1\\esp32/flags/cpp_flags" -Og -g3 -Werror=return-type -DF_CPU=240000000L -DARDUINO=10607 -DARDUINO_ESP32_WROOM_DA -DARDUINO_ARCH_ESP32 "-DARDUINO_BOARD=\"ESP32_WROOM_DA\"" "-DARDUINO_VARIANT=\"esp32da\"" -DARDUINO_PARTITION_default "-DARDUINO_HOST_OS=\"windows\"" "-DARDUINO_FQBN=\"esp32:esp32:esp32da:UploadSpeed=921600,CPUFreq=240,FlashFreq=80,FlashMode=qio,FlashSize=4M,PartitionScheme=default,DebugLevel=none,LoopCore=1,EventsCore=1,EraseFlash=none\"" -DESP32=ESP32 -DCORE_DEBUG_LEVEL=0 -DARDUINO_RUNNING_CORE=1 -DARDUINO_EVENT_RUNNING_CORE=1 -DARDUINO_USB_CDC_ON_BOOT=0 "@C:\\Users\\johnl\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esp32-arduino-libs\\idf-release_v5.3-cfea4f7c-v1\\esp32/flags/defines" "-IC:\\Arduino2\\sketchbook\\ESP32\\esp32_weblights_V1_2" -iprefix "C:\\Users\\johnl\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esp32-arduino-libs\\idf-release_v5.3-cfea4f7c-v1\\esp32/include/" "@C:\\Users\\johnl\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esp32-arduino-libs\\idf-release_v5.3-cfea4f7c-v1\\esp32/flags/includes" "-IC:\\Users\\johnl\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esp32-arduino-libs\\idf-release_v5.3-cfea4f7c-v1\\esp32/qio_qspi/include" "-IC:\\Users\\johnl\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.1.1\\cores\\esp32" "-IC:\\Users\\johnl\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.1.1\\variants\\esp32da" "-IC:\\Users\\johnl\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.1.1\\libraries\\WiFi\\src" "-IC:\\Users\\johnl\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.1.1\\libraries\\Network\\src" "-IC:\\Users\\johnl\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.1.1\\libraries\\Preferences\\src" "-IC:\\Users\\johnl\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.1.1\\libraries\\FS\\src" "-IC:\\Users\\johnl\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.1.1\\libraries\\LittleFS\\src" "-Ic:\\Arduino2\\sketchbook\\libraries\\ESP32Ping-master" "@C:\\Users\\johnl\\AppData\\Local\\arduino\\sketches\\AF0B714BBE955ECED64F2C344BD4FADF/build_opt.h" "@C:\\Users\\johnl\\AppData\\Local\\arduino\\sketches\\AF0B714BBE955ECED64F2C344BD4FADF/file_opts" "C:\\Users\\johnl\\AppData\\Local\\arduino\\sketches\\AF0B714BBE955ECED64F2C344BD4FADF\\sketch\\esp32_weblights_V1_2.ino.cpp" -o "C:\\Users\\johnl\\AppData\\Local\\arduino\\sketches\\AF0B714BBE955ECED64F2C344BD4FADF\\sketch\\esp32_weblights_V1_2.ino.cpp.o"
Compiling libraries...
Compiling library "WiFi"
Using previously compiled file: C:\Users\johnl\AppData\Local\arduino\sketches\AF0B714BBE955ECED64F2C344BD4FADF\libraries\WiFi\WiFiScan.cpp.o
Using previously compiled file: C:\Users\johnl\AppData\Local\arduino\sketches\AF0B714BBE955ECED64F2C344BD4FADF\libraries\WiFi\WiFiAP.cpp.o
Using previously compiled file: C:\Users\johnl\AppData\Local\arduino\sketches\AF0B714BBE955ECED64F2C344BD4FADF\libraries\WiFi\WiFiMulti.cpp.o
Using previously compiled file: C:\Users\johnl\AppData\Local\arduino\sketches\AF0B714BBE955ECED64F2C344BD4FADF\libraries\WiFi\AP.cpp.o
Using previously compiled file: C:\Users\johnl\AppData\Local\arduino\sketches\AF0B714BBE955ECED64F2C344BD4FADF\libraries\WiFi\STA.cpp.o
Using previously compiled file: C:\Users\johnl\AppData\Local\arduino\sketches\AF0B714BBE955ECED64F2C344BD4FADF\libraries\WiFi\WiFiSTA.cpp.o
Using previously compiled file: C:\Users\johnl\AppData\Local\arduino\sketches\AF0B714BBE955ECED64F2C344BD4FADF\libraries\WiFi\WiFi.cpp.o
Using previously compiled file: C:\Users\johnl\AppData\Local\arduino\sketches\AF0B714BBE955ECED64F2C344BD4FADF\libraries\WiFi\WiFiGeneric.cpp.o
Compiling library "Networking"
Using previously compiled file: C:\Users\johnl\AppData\Local\arduino\sketches\AF0B714BBE955ECED64F2C344BD4FADF\libraries\Network\NetworkEvents.cpp.o
Using previously compiled file: C:\Users\johnl\AppData\Local\arduino\sketches\AF0B714BBE955ECED64F2C344BD4FADF\libraries\Network\NetworkServer.cpp.o
Using previously compiled file: C:\Users\johnl\AppData\Local\arduino\sketches\AF0B714BBE955ECED64F2C344BD4FADF\libraries\Network\NetworkUdp.cpp.o
Using previously compiled file: C:\Users\johnl\AppData\Local\arduino\sketches\AF0B714BBE955ECED64F2C344BD4FADF\libraries\Network\NetworkManager.cpp.o
Using previously compiled file: C:\Users\johnl\AppData\Local\arduino\sketches\AF0B714BBE955ECED64F2C344BD4FADF\libraries\Network\NetworkClient.cpp.o
Using previously compiled file: C:\Users\johnl\AppData\Local\arduino\sketches\AF0B714BBE955ECED64F2C344BD4FADF\libraries\Network\NetworkInterface.cpp.o
Compiling library "Preferences"
Using previously compiled file: C:\Users\johnl\AppData\Local\arduino\sketches\AF0B714BBE955ECED64F2C344BD4FADF\libraries\Preferences\Preferences.cpp.o
Compiling library "FS"
Using previously compiled file: C:\Users\johnl\AppData\Local\arduino\sketches\AF0B714BBE955ECED64F2C344BD4FADF\libraries\FS\FS.cpp.o
Using previously compiled file: C:\Users\johnl\AppData\Local\arduino\sketches\AF0B714BBE955ECED64F2C344BD4FADF\libraries\FS\vfs_api.cpp.o
Compiling library "LittleFS"
Using previously compiled file: C:\Users\johnl\AppData\Local\arduino\sketches\AF0B714BBE955ECED64F2C344BD4FADF\libraries\LittleFS\LittleFS.cpp.o
Compiling library "ESP32Ping"
Using previously compiled file: C:\Users\johnl\AppData\Local\arduino\sketches\AF0B714BBE955ECED64F2C344BD4FADF\libraries\ESP32Ping-master\ping.cpp.o
Using previously compiled file: C:\Users\johnl\AppData\Local\arduino\sketches\AF0B714BBE955ECED64F2C344BD4FADF\libraries\ESP32Ping-master\ESP32Ping.cpp.o
Compiling core...
cmd /c echo -DARDUINO_CORE_BUILD > "C:\\Users\\johnl\\AppData\\Local\\arduino\\sketches\\AF0B714BBE955ECED64F2C344BD4FADF/file_opts"
Using precompiled core: C:\Users\johnl\AppData\Local\arduino\cores\cde6be99dd5fecb190cb411193add70a\core.a
cmd /c type nul > "C:\\Users\\johnl\\AppData\\Local\\arduino\\sketches\\AF0B714BBE955ECED64F2C344BD4FADF/file_opts"
Linking everything together...
"C:\\Users\\johnl\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esp-x32\\2405/bin/xtensa-esp32-elf-g++" "-Wl,--Map=C:\\Users\\johnl\\AppData\\Local\\arduino\\sketches\\AF0B714BBE955ECED64F2C344BD4FADF/esp32_weblights_V1_2.ino.map" "-LC:\\Users\\johnl\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esp32-arduino-libs\\idf-release_v5.3-cfea4f7c-v1\\esp32/lib" "-LC:\\Users\\johnl\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esp32-arduino-libs\\idf-release_v5.3-cfea4f7c-v1\\esp32/ld" "-LC:\\Users\\johnl\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esp32-arduino-libs\\idf-release_v5.3-cfea4f7c-v1\\esp32/qio_qspi" -Wl,--wrap=esp_panic_handler "@C:\\Users\\johnl\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esp32-arduino-libs\\idf-release_v5.3-cfea4f7c-v1\\esp32/flags/ld_flags" "@C:\\Users\\johnl\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esp32-arduino-libs\\idf-release_v5.3-cfea4f7c-v1\\esp32/flags/ld_scripts" -Wl,--start-group "C:\\Users\\johnl\\AppData\\Local\\arduino\\sketches\\AF0B714BBE955ECED64F2C344BD4FADF\\sketch\\esp32_weblights_V1_2.ino.cpp.o" "C:\\Users\\johnl\\AppData\\Local\\arduino\\sketches\\AF0B714BBE955ECED64F2C344BD4FADF\\libraries\\WiFi\\AP.cpp.o" "C:\\Users\\johnl\\AppData\\Local\\arduino\\sketches\\AF0B714BBE955ECED64F2C344BD4FADF\\libraries\\WiFi\\STA.cpp.o" "C:\\Users\\johnl\\AppData\\Local\\arduino\\sketches\\AF0B714BBE955ECED64F2C344BD4FADF\\libraries\\WiFi\\WiFi.cpp.o" "C:\\Users\\johnl\\AppData\\Local\\arduino\\sketches\\AF0B714BBE955ECED64F2C344BD4FADF\\libraries\\WiFi\\WiFiAP.cpp.o" "C:\\Users\\johnl\\AppData\\Local\\arduino\\sketches\\AF0B714BBE955ECED64F2C344BD4FADF\\libraries\\WiFi\\WiFiGeneric.cpp.o" "C:\\Users\\johnl\\AppData\\Local\\arduino\\sketches\\AF0B714BBE955ECED64F2C344BD4FADF\\libraries\\WiFi\\WiFiMulti.cpp.o" "C:\\Users\\johnl\\AppData\\Local\\arduino\\sketches\\AF0B714BBE955ECED64F2C344BD4FADF\\libraries\\WiFi\\WiFiSTA.cpp.o" "C:\\Users\\johnl\\AppData\\Local\\arduino\\sketches\\AF0B714BBE955ECED64F2C344BD4FADF\\libraries\\WiFi\\WiFiScan.cpp.o" "C:\\Users\\johnl\\AppData\\Local\\arduino\\sketches\\AF0B714BBE955ECED64F2C344BD4FADF\\libraries\\Network\\NetworkClient.cpp.o" "C:\\Users\\johnl\\AppData\\Local\\arduino\\sketches\\AF0B714BBE955ECED64F2C344BD4FADF\\libraries\\Network\\NetworkEvents.cpp.o" "C:\\Users\\johnl\\AppData\\Local\\arduino\\sketches\\AF0B714BBE955ECED64F2C344BD4FADF\\libraries\\Network\\NetworkInterface.cpp.o" "C:\\Users\\johnl\\AppData\\Local\\arduino\\sketches\\AF0B714BBE955ECED64F2C344BD4FADF\\libraries\\Network\\NetworkManager.cpp.o" "C:\\Users\\johnl\\AppData\\Local\\arduino\\sketches\\AF0B714BBE955ECED64F2C344BD4FADF\\libraries\\Network\\NetworkServer.cpp.o" "C:\\Users\\johnl\\AppData\\Local\\arduino\\sketches\\AF0B714BBE955ECED64F2C344BD4FADF\\libraries\\Network\\NetworkUdp.cpp.o" "C:\\Users\\johnl\\AppData\\Local\\arduino\\sketches\\AF0B714BBE955ECED64F2C344BD4FADF\\libraries\\Preferences\\Preferences.cpp.o" "C:\\Users\\johnl\\AppData\\Local\\arduino\\sketches\\AF0B714BBE955ECED64F2C344BD4FADF\\libraries\\FS\\FS.cpp.o" "C:\\Users\\johnl\\AppData\\Local\\arduino\\sketches\\AF0B714BBE955ECED64F2C344BD4FADF\\libraries\\FS\\vfs_api.cpp.o" "C:\\Users\\johnl\\AppData\\Local\\arduino\\sketches\\AF0B714BBE955ECED64F2C344BD4FADF\\libraries\\LittleFS\\LittleFS.cpp.o" "C:\\Users\\johnl\\AppData\\Local\\arduino\\sketches\\AF0B714BBE955ECED64F2C344BD4FADF\\libraries\\ESP32Ping-master\\ESP32Ping.cpp.o" "C:\\Users\\johnl\\AppData\\Local\\arduino\\sketches\\AF0B714BBE955ECED64F2C344BD4FADF\\libraries\\ESP32Ping-master\\ping.cpp.o" "C:\\Users\\johnl\\AppData\\Local\\arduino\\cores\\cde6be99dd5fecb190cb411193add70a\\core.a" "@C:\\Users\\johnl\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esp32-arduino-libs\\idf-release_v5.3-cfea4f7c-v1\\esp32/flags/ld_libs" -Wl,--end-group -Wl,-EL -o "C:\\Users\\johnl\\AppData\\Local\\arduino\\sketches\\AF0B714BBE955ECED64F2C344BD4FADF/esp32_weblights_V1_2.ino.elf"
C:/Users/johnl/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2405/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:\Users\johnl\AppData\Local\arduino\sketches\AF0B714BBE955ECED64F2C344BD4FADF\sketch\esp32_weblights_V1_2.ino.cpp.o:(.literal._Z4loopv+0x1c): undefined reference to `amb(bool)'
C:/Users/johnl/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2405/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:\Users\johnl\AppData\Local\arduino\sketches\AF0B714BBE955ECED64F2C344BD4FADF\sketch\esp32_weblights_V1_2.ino.cpp.o:(.literal._Z4loopv+0x20): undefined reference to `red(bool)'
C:/Users/johnl/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2405/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:\Users\johnl\AppData\Local\arduino\sketches\AF0B714BBE955ECED64F2C344BD4FADF\sketch\esp32_weblights_V1_2.ino.cpp.o:(.literal._Z5setupv+0x3c): undefined reference to `initIO()'
C:/Users/johnl/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2405/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:\Users\johnl\AppData\Local\arduino\sketches\AF0B714BBE955ECED64F2C344BD4FADF\sketch\esp32_weblights_V1_2.ino.cpp.o:(.literal._Z5setupv+0x40): undefined reference to `flashAll(int, int)'
C:/Users/johnl/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2405/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:\Users\johnl\AppData\Local\arduino\sketches\AF0B714BBE955ECED64F2C344BD4FADF\sketch\esp32_weblights_V1_2.ino.cpp.o: in function `loop()':
C:\Arduino2\sketchbook\ESP32\esp32_weblights_V1_2/esp32_weblights_V1_2.ino:159:(.text._Z4loopv+0x5c): undefined reference to `amb(bool)'
C:/Users/johnl/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2405/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:\Arduino2\sketchbook\ESP32\esp32_weblights_V1_2/esp32_weblights_V1_2.ino:170:(.text._Z4loopv+0xe6): undefined reference to `amb(bool)'
C:/Users/johnl/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2405/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:\Arduino2\sketchbook\ESP32\esp32_weblights_V1_2/esp32_weblights_V1_2.ino:188:(.text._Z4loopv+0x136): undefined reference to `red(bool)'
C:/Users/johnl/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2405/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:\Arduino2\sketchbook\ESP32\esp32_weblights_V1_2/esp32_weblights_V1_2.ino:195:(.text._Z4loopv+0x174): undefined reference to `red(bool)'
C:/Users/johnl/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2405/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:\Users\johnl\AppData\Local\arduino\sketches\AF0B714BBE955ECED64F2C344BD4FADF\sketch\esp32_weblights_V1_2.ino.cpp.o: in function `setup()':
C:\Arduino2\sketchbook\ESP32\esp32_weblights_V1_2/esp32_weblights_V1_2.ino:109:(.text._Z5setupv+0x4d): undefined reference to `initIO()'
C:/Users/johnl/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2405/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:\Arduino2\sketchbook\ESP32\esp32_weblights_V1_2/esp32_weblights_V1_2.ino:110:(.text._Z5setupv+0x58): undefined reference to `flashAll(int, int)'
collect2.exe: error: ld returned 1 exit status

Using library WiFi at version 3.1.1 in folder: C:\Users\johnl\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.1\libraries\WiFi 
Using library Networking at version 3.1.1 in folder: C:\Users\johnl\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.1\libraries\Network 
Using library Preferences at version 3.1.1 in folder: C:\Users\johnl\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.1\libraries\Preferences 
Using library FS at version 3.1.1 in folder: C:\Users\johnl\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.1\libraries\FS 
Using library LittleFS at version 3.1.1 in folder: C:\Users\johnl\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.1\libraries\LittleFS 
Using library ESP32Ping at version 1.7 in folder: C:\Arduino2\sketchbook\libraries\ESP32Ping-master 
exit status 1

Compilation error: exit status 1

this is the main code

/*
* ESP32 - get wifi credentials from serial monitor
* using wifi events
* 
*/

//To include a library, you can use #include <LibraryName.h> for standard libraries or #include "LibraryName.h" for libraries in the current sketch directory.

// #include "webstats.h"     // declarations of variables to calculate statistics and handle time
#include <WiFi.h>         //WiFi functions - supports wifi.ino
#include <time.h>         //support for time functions
#include <Preferences.h>  // for functions relating to flash memory
#include <FS.h>           // was in quotes
#include <LittleFS.h>       //code from LittleFS_test example
#include "ESP32Ping.h"  //handles the ping functions   https://github.com/marian-craciunescu/ESP32Ping
#include "weblights.h"  //variables for ping calculations etc

Preferences myprefs;  //create an instance of the library, called myprefs

#define BAUDRATE 115200

//lights and switches  :  shown here so we can see what lights are being turned on/off
//constexpr allows data to be transferred between code and interrupt or event
constexpr int trigger = 4;  //button to GND; press to clear the existing connection and allow reconfiguration
constexpr int rLed = 18;    //red led + 1k to GND
constexpr int yLed = 19;    //yellow LED + 1k to GND
constexpr int gLed = 21;    //green LED + 1k to GND
constexpr int bLed = 22;    //blue led + 1k to GND
constexpr int wLed = 23;    //white LED + 1k to GND

//hardware management
boolean triggerState = 0;  //moitor to check for a change
boolean triggerEvent = 0;  // 1 shows a trigger event has occurred

//for preferences storage
#define RW_MODE false
#define RO_MODE true

#define FORMAT_LITTLEFS_IF_FAILED true

String ssid = "xxx";  //
String pass = "xxx";

/* Configuration of NTP */
#define MY_NTP_SERVER "pool.ntp.org"
#define MY_TZ "GMT0"  //not working - not used
time_t now;           // this is the epoch
tm tm;

//  *** loop handling  ***
int phase = 1;  // switch parameter
unsigned long timeWas, timeNow;
unsigned long interval = 60000;  //

//CHOOSE TARGET
//const IPAddress remote_ip(192, 168, 1, 1);  //ping the router
//const IPAddress remote_ip(192, 168, 1, 22);  //to ping network printer for testing
//const IPAddress remote_ip(185, 217, 104, 171); //to ping TheHUT: doesnt work if in header file
//const IPAddress remote_ip(9, 9, 9, 9);  //to ping Quad9
const IPAddress remote_ip(192, 0, 43, 10);  //to ping example.com et up by IANA as a ping target
//const IPAddress remote_ip(8, 8, 8, 8);  //google dns
//const IPAddress remote_ip(1 ,1, 1, 1); // Cloudflare dns USA



//function prototypes FS.ino
void listDir(fs::FS &fs, const char *dirname, uint8_t levels);
void createDir(fs::FS &fs, const char *path) ;
void removeDir(fs::FS &fs, const char *path) ;
void readFile(fs::FS &fs, const char *path) ;
void writeFile(fs::FS &fs, const char *path, const char *message) ;
void appendFile(fs::FS &fs, const char *path, const char *message) ;
void renameFile(fs::FS &fs, const char *path1, const char *path2) ;
void deleteFile(fs::FS &fs, const char *path) ;
//functions we likely wont use
// SPIFFS-like write and delete file, better use #define CONFIG_LITTLEFS_SPIFFS_COMPAT 1
void writeFile2(fs::FS &fs, const char *path, const char *message) ;
void deleteFile2(fs::FS &fs, const char *path) ;
void testFileIO(fs::FS &fs, const char *path) ;

// function prototypes wifi.ino
void WiFiStationConnected(WiFiEvent_t event, WiFiEventInfo_t info);
void WiFiGotIP(WiFiEvent_t event, WiFiEventInfo_t info);
void WiFiStationDisconnected(WiFiEvent_t event, WiFiEventInfo_t info);
String waitForSerialInput(String prompt);  //prompt and read a string from serial io
void serGetCreds();                        //input new credentials from serial io
void getCreds();                           //get saved credentials from myprefs
void saveCreds(String ssid, String pass);  //save credentials to myprefs
void printLocalTime();

bool pingStats();  //in pingstats tab

// function prototypes hardio.ino
void red(boolean state);
void amb(boolean state);
void grn(boolean state);
void blu(boolean state);
void initIO();                       //initialise hardware IO devices all leds off
void flashAll(int count, int rate);  //flash all LEDs count times

void setup() {
  Serial.begin(BAUDRATE);
  Serial.println();
  Serial.println(__FILE__);  //print name of sketch for easy identification
  delay(4000);               //allow to start & clear serial monitor
  initIO();                  //initialise hardware IO devices all leds off
  flashAll(10, 250);         //test leds
  Serial.println("Serial comms established");
  //create a new storage space on the flash memory with the credentials namespace.  false=read-write (true = read only)
  myprefs.begin("credentials", RW_MODE);
  getCreds();
  Serial.print("Retrieved values: SSID: ");
  Serial.print(ssid);
  Serial.print(" and PASS: ");
  Serial.println(pass);
  /*
   if (!LittleFS.begin(FORMAT_LITTLEFS_IF_FAILED)) {
    Serial.println("LittleFS Mount Failed");
    return;
  }
  //littleFStest
  listDir(LittleFS, "/", 3);
  createDir(LittleFS, "/mydir");
  writeFile(LittleFS, "/mydir/hello2.txt", "Hello2");
  listDir(LittleFS, "/", 1);
  deleteFile(LittleFS, "/mydir/hello2.txt");
  removeDir(LittleFS, "/mydir");
  listDir(LittleFS, "/", 1);
  writeFile(LittleFS, "/hello.txt", "Hello ");
  appendFile(LittleFS, "/hello.txt", "World!\r\n");
  readFile(LittleFS, "/hello.txt");
*/

  //WiFi event handlers
  WiFi.onEvent(WiFiStationConnected, WiFiEvent_t::ARDUINO_EVENT_WIFI_STA_CONNECTED);
  WiFi.onEvent(WiFiGotIP, WiFiEvent_t::ARDUINO_EVENT_WIFI_STA_GOT_IP);
  WiFi.onEvent(WiFiStationDisconnected, WiFiEvent_t::ARDUINO_EVENT_WIFI_STA_DISCONNECTED);

  //connectWiFi();
  WiFi.begin(ssid, pass);
  configTime(0, 0, MY_NTP_SERVER);  // --> Here is the IMPORTANT ONE LINER needed in your sketch!
  timeWas = millis();
}

void loop() {
  switch (phase) {
    case 1: //printing local time
      {
        Serial.print("loop: ");
        printLocalTime();
        phase = 2;
      }
      break;
    case 2: //stsrting ping
      {
        amb(1); //showing pinging in progress
        Serial.print("Pinging ip  ");
        Serial.println(remote_ip);
        //ping it
        bool pingOK = Ping.ping(remote_ip, pingNumber);  //produces values for pingTime, expectedCount, success, errors
        pingStats();
        phase = 3;
      }
      break;
    case 3:
      {
        amb(0); //ping complete
       phase = 4;
      }
      break;
    case 4:  //loop timing
      {
        timeNow = millis();
        if (timeNow >= (timeWas + (timeInterval * 1000))) {  //time for another ping?
          timeWas = timeNow;
          phase = 5;
        }
      }
      break;
    case 5:  //check for reset credentials
      {
        if (!digitalRead(trigger) != triggerState) {  //they are different so button has been pressed
          //triggerEvent = 1;
          triggerState = 1;
          red(1);
          serGetCreds();
          // delete old config
          WiFi.disconnect(true);
          //connectWiFi();
          WiFi.begin(ssid, pass);
          delay(1000);
          red(0);
          triggerState = 0;  //ready for another trigger:: should this go elsewhere?
        }
        phase = 1;
      }
      break;
  }
}



hardio.ino tab

//management of light and switch functions

void red(boolean state) {
  digitalWrite(rLed, state);
}

void amb(boolean state) {
  digitalWrite(yLed, state);
}

void grn(boolean state) {
  digitalWrite(gLed, state);
}

void blu(boolean state) {
  digitalWrite(bLed, state);
}

void initIO() {  //initialise hardware IO devices all leds off
  pinMode(trigger, INPUT_PULLUP);

  pinMode(rLed, OUTPUT);
  pinMode(yLed, OUTPUT);
  pinMode(gLed, OUTPUT);
  pinMode(bLed, OUTPUT);
  red(0);
  amb(0);
  grn(0);
  blu(0);
  Serial.println("initIO: hardware configured");
}

void flashAll(int count, int rate) {  //and pass some time for a connection to establish
  for (int i = 0; i <= count; i++) {  //blue is not flashed - indicates wifi
    delay(rate);
    red(1);
    amb(1);
    grn(1);
    delay(rate);
    red(0);
    amb(0);
    grn(0);
  }
}

FS.ino tab

/*
* from examples littlefstest
*/


void listDir(fs::FS &fs, const char *dirname, uint8_t levels) {
  Serial.printf("Listing directory: %s\r\n", dirname);

  File root = fs.open(dirname);
  if (!root) {
    Serial.println("- failed to open directory");
    return;
  }
  if (!root.isDirectory()) {
    Serial.println(" - not a directory");
    return;
  }

  File file = root.openNextFile();
  while (file) {
    if (file.isDirectory()) {
      Serial.print("  DIR : ");
      Serial.println(file.name());
      if (levels) {
        listDir(fs, file.path(), levels - 1);
      }
    } else {
      Serial.print("  FILE: ");
      Serial.print(file.name());
      Serial.print("\tSIZE: ");
      Serial.println(file.size());
    }
    file = root.openNextFile();
  }
}

void createDir(fs::FS &fs, const char *path) {
  Serial.printf("Creating Dir: %s\n", path);
  if (fs.mkdir(path)) {
    Serial.println("Dir created");
  } else {
    Serial.println("mkdir failed");
  }
}

void removeDir(fs::FS &fs, const char *path) {
  Serial.printf("Removing Dir: %s\n", path);
  if (fs.rmdir(path)) {
    Serial.println("Dir removed");
  } else {
    Serial.println("rmdir failed");
  }
}

void readFile(fs::FS &fs, const char *path) {
  Serial.printf("Reading file: %s\r\n", path);

  File file = fs.open(path);
  if (!file || file.isDirectory()) {
    Serial.println("- failed to open file for reading");
    return;
  }

  Serial.println("- read from file:");
  while (file.available()) {
    Serial.write(file.read());
  }
  file.close();
}

void writeFile(fs::FS &fs, const char *path, const char *message) {
  Serial.printf("Writing file: %s\r\n", path);

  File file = fs.open(path, FILE_WRITE);
  if (!file) {
    Serial.println("- failed to open file for writing");
    return;
  }
  if (file.print(message)) {
    Serial.println("- file written");
  } else {
    Serial.println("- write failed");
  }
  file.close();
}

void appendFile(fs::FS &fs, const char *path, const char *message) {
  Serial.printf("Appending to file: %s\r\n", path);

  File file = fs.open(path, FILE_APPEND);
  if (!file) {
    Serial.println("- failed to open file for appending");
    return;
  }
  if (file.print(message)) {
    Serial.println("- message appended");
  } else {
    Serial.println("- append failed");
  }
  file.close();
}

void renameFile(fs::FS &fs, const char *path1, const char *path2) {
  Serial.printf("Renaming file %s to %s\r\n", path1, path2);
  if (fs.rename(path1, path2)) {
    Serial.println("- file renamed");
  } else {
    Serial.println("- rename failed");
  }
}

void deleteFile(fs::FS &fs, const char *path) {
  Serial.printf("Deleting file: %s\r\n", path);
  if (fs.remove(path)) {
    Serial.println("- file deleted");
  } else {
    Serial.println("- delete failed");
  }
}

/*
//functions we likely wont use
// SPIFFS-like write and delete file, better use #define CONFIG_LITTLEFS_SPIFFS_COMPAT 1

void writeFile2(fs::FS &fs, const char *path, const char *message) {
  if (!fs.exists(path)) {
    if (strchr(path, '/')) {
      Serial.printf("Create missing folders of: %s\r\n", path);
      char *pathStr = strdup(path);
      if (pathStr) {
        char *ptr = strchr(pathStr, '/');
        while (ptr) {
          *ptr = 0;
          fs.mkdir(pathStr);
          *ptr = '/';
          ptr = strchr(ptr + 1, '/');
        }
      }
      free(pathStr);
    }
  }

  Serial.printf("Writing file to: %s\r\n", path);
  File file = fs.open(path, FILE_WRITE);
  if (!file) {
    Serial.println("- failed to open file for writing");
    return;
  }
  if (file.print(message)) {
    Serial.println("- file written");
  } else {
    Serial.println("- write failed");
  }
  file.close();
}

void deleteFile2(fs::FS &fs, const char *path) {
  Serial.printf("Deleting file and empty folders on path: %s\r\n", path);

  if (fs.remove(path)) {
    Serial.println("- file deleted");
  } else {
    Serial.println("- delete failed");
  }

  char *pathStr = strdup(path);
  if (pathStr) {
    char *ptr = strrchr(pathStr, '/');
    if (ptr) {
      Serial.printf("Removing all empty folders on path: %s\r\n", path);
    }
    while (ptr) {
      *ptr = 0;
      fs.rmdir(pathStr);
      ptr = strrchr(pathStr, '/');
    }
    free(pathStr);
  }
}

void testFileIO(fs::FS &fs, const char *path) {
  Serial.printf("Testing file I/O with %s\r\n", path);

  static uint8_t buf[512];
  size_t len = 0;
  File file = fs.open(path, FILE_WRITE);
  if (!file) {
    Serial.println("- failed to open file for writing");
    return;
  }

  size_t i;
  Serial.print("- writing");
  uint32_t start = millis();
  for (i = 0; i < 2048; i++) {
    if ((i & 0x001F) == 0x001F) {
      Serial.print(".");
    }
    file.write(buf, 512);
  }
  Serial.println("");
  uint32_t end = millis() - start;
  Serial.printf(" - %u bytes written in %lu ms\r\n", 2048 * 512, end);
  file.close();

  file = fs.open(path);
  start = millis();
  end = start;
  i = 0;
  if (file && !file.isDirectory()) {
    len = file.size();
    size_t flen = len;
    start = millis();
    Serial.print("- reading");
    while (len) {
      size_t toRead = len;
      if (toRead > 512) {
        toRead = 512;
      }
      file.read(buf, toRead);
      if ((i++ & 0x001F) == 0x001F) {
        Serial.print(".");
      }
      len -= toRead;
    }
    Serial.println("");
    end = millis() - start;
    Serial.printf("- %u bytes read in %lu ms\r\n", flen, end);
    file.close();
  } else {
    Serial.println("- failed to open file for reading");
  }
}

I'm happy to zip and upload the whole sketch if anyone thinks thats useful.

Hi @johnerrington. I tried to take a look, but I ran into a few unrelated problems so I was not able to reproduce the errors you are encountering:

  • Compilation fails due to unterminated block comment in FS.ino.
    • Note that a block comment starts at line 122 of that file, but there is no corresponding */operator after that in the file.
  • Missing weblights.h file.
  • Missing function definitions:
    C:/Users/per/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2405/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld.exe:    C:\Users\per\AppData\Local\arduino\sketches\3F2B0312189A11945FF6715FD0B2A08C\sketch\1356089.ino.cpp.o:(.literal._Z4loopv+0x3c): undefined reference to `serGetCreds()'
    C:/Users/per/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2405/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld.exe:    C:\Users\per\AppData\Local\arduino\sketches\3F2B0312189A11945FF6715FD0B2A08C\sketch\1356089.ino.cpp.o:(.literal._Z4loopv+0x40): undefined reference to `printLocalTime()'
    C:/Users/per/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2405/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld.exe:    C:\Users\per\AppData\Local\arduino\sketches\3F2B0312189A11945FF6715FD0B2A08C\sketch\1356089.ino.cpp.o:(.literal._Z4loopv+0x44): undefined reference to `pingStats()'
    C:/Users/per/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2405/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld.exe:    C:\Users\per\AppData\Local\arduino\sketches\3F2B0312189A11945FF6715FD0B2A08C\sketch\1356089.ino.cpp.o:(.literal._Z5setupv+0x18): undefined reference to `WiFiStationConnected(arduino_event_id_t, arduino_event_info_t)'
    C:/Users/per/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2405/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld.exe:    C:\Users\per\AppData\Local\arduino\sketches\3F2B0312189A11945FF6715FD0B2A08C\sketch\1356089.ino.cpp.o:(.literal._Z5setupv+0x1c): undefined reference to `WiFiGotIP(arduino_event_id_t, arduino_event_info_t)'
    C:/Users/per/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2405/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld.exe:    C:\Users\per\AppData\Local\arduino\sketches\3F2B0312189A11945FF6715FD0B2A08C\sketch\1356089.ino.cpp.o:(.literal._Z5setupv+0x20): undefined reference to `WiFiStationDisconnected(arduino_event_id_t, arduino_event_info_t)'
    C:/Users/per/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2405/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld.exe:    C:\Users\per\AppData\Local\arduino\sketches\3F2B0312189A11945FF6715FD0B2A08C\sketch\1356089.ino.cpp.o:(.literal._Z5setupv+0x2c): undefined reference to `getCreds()'
    
    It looks like at least some of these are defined in a file named wifi.ino

It will probably be best. Hopefully that will give me everything I need to reproduce the errors.

Thanks for your rapid response!
esp32_weblights_V1_2.zip (10.2 KB)

I've corrected the block comment but the error remains.

While there certainly could be a bug here worth pursuing, my impression of using multiple .ino files is that the builder would "glue" them all together into a single file (an .ino.cpp), and then automatically insert forward declarations as needed; which it does even with a single .ino

So if you're doing the forward declarations anyway

try going with the standard approach: put those in an FS.h, and include that both in the corresponding FS.cpp implementation file, and in the one-and-only .ino. Same with hardio.h and hardio.cpp, etc.

One downside: almost double the number of tabs. Mitigation for that: put some or all the .h&.cpp file pairs in a src subdirectory, and they won't be opened in tabs automatically. They will be compiled though. Then you'll want to enable "Show files inside sketches" in the Preferences so you can open them. (You can also now close them.) To create more files there, include the path in the New Tab dialog; e.g. src/some_other.h

put those in an FS.h
that is the library file which I wouldnt want to change.

Using library FS at version 3.1.1 in folder: C:\Users\johnl\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.1\libraries\FS

I thought I was. But quite confused. Especially when I expect the compiler to pick up functions from other tabs and it doesnnt.
But I put the function definitions there mainly for documentation so I dont have to refer out of the main tab to see what functions are doing.

there arent any .cpp files.
I'll try your idea of putting them in a src directory.

but I still dont see why the compiler shoulfd throw an "undefined reference" to InitIO()
2/esp32_weblights_V1_2.ino:109:(.text._Z5setupv+0x4d): undefined reference to `initIO()'
line 109 initIO(); //initialise hardware IO devices all leds off
when the function is present in hardio.ino AND the prototype in the main tab.
line 101 void initIO();

If you put stuff in src, then

#include "src/FS.h"

should be specific enough to avoid confusion with <FS.h> in a library somewhere. But if not, you can always choose another name for the file pair. And in this case you should, because the functions like listDir are part of the example; so put them in a file called (just a suggestion) FS_helpers.cpp and then the declarations in FS_helpers.h.

Yes, so another branch to try: if you delete all the forward declarations (function prototypes) in the main .ino, does it work? Does renaming the file to FS_helpers.ino have any effect, before or after deleting?

@kenb4 I tried changing to cpp and h but got mired in confusion, with even more errors. Using ino's has worked for me until now.
I've changed the name of the FS tab to FileIO.ino
and for some mystifying reason the errors have disappeared.

Thanks all for your help.

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