I am now getting this error with almost all of my sketches, but it started with the attached sketch. Please understand that the sketch worked until four months ago. There was a power outage and the sketch would not restart. The boards ( there is a transmitter and a receiver) located at a remote location.
The complete error code is:
Build options changed, rebuilding all core/core.a(main.cpp.o):(.literal._Z8loopTaskPv+0x4): undefined reference to `loop()' core/core.a(main.cpp.o): In function `loopTask(void*)': /home/gar/.arduino15/packages/esp32/hardware/esp32/1.0.3/cores/esp32/main.cpp:17: undefined reference to `loop()' collect2: error: ld returned 1 exit status Multiple libraries were found for "WiFiClient.h" Used: /home/gar/.arduino15/packages/esp32/hardware/esp32/1.0.3/libraries/WiFi Not used: /home/gar/arduino/libraries/WiFi exit status 1 Error compiling for board NodeMCU-32S.
Please advise something to try. I have tried to remove parts of the program such as #include <EspMQTTClient.h>. This seemed to work one time only, but never again.
Can you tell me exactly which code are you trying to upload? Is everything up to date?
I experienced similar messages when I had multiple versions of Arduino installed with different library sets. There may be a way to limit where the compiler searches and loads libraries from, but I opted to remove all except for my most current Arduino setup to keep it simple and avoid library confusion. (Hope this helps…)