I get the above error when trying to build the project. I'm not quite sure how to solve the problem.
I've pasted the terminal output below:
Executing task: platformio run <
Processing esp32dev (platform: espressif32; board: esp32dev; framework: arduino)
Verbose mode can be enabled via -v, --verbose
option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/esp32dev.html
PLATFORM: Espressif 32 1.11.1 > Espressif ESP32 Dev Module
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
DEBUG: Current (esp-prog) External (esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa)
PACKAGES: toolchain-xtensa32 2.50200.80 (5.2.0), framework-arduinoespressif32 2.10004.191002 (1.0.4), tool-esptoolpy 1.20600.0 (2.6.0)
LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 35 compatible libraries
Scanning dependencies...
Dependency Graph
|-- 3.1.5
|--
| |-- 1.1.6
| | |-- 1.0.1
|--
| |-- 1.0
| | |-- 1.0
| | | |-- 1.0
| | |-- 1.0
| | |-- 1.0
| |--
| | |-- 1.1.6
| | | |-- 1.0.1
| |-- 1.0
| |--
| | |-- 1.0
| | |--
| | | |-- 1.1.6
| | | | |-- 1.0.1
| | |-- 1.0
| | |-- <TFT_eSPI> 1.4.21
| | | |-- 1.0
| | | |-- 1.0
| | | |-- 1.0
| | | | |-- 1.0
| | |-- 1.0.3
| | |-- 1.0
| | |-- 1.8.0
| | | |-- <SD(esp32)> 1.0.5
| | | | |-- 1.0
| | | | |-- 1.0
| | | |-- 1.0
| | | |-- 1.0
| | | | |-- 1.0
| |-- 0.6.1
| | |-- 1.0
| | |-- <SD(esp32)> 1.0.5
| | | |-- 1.0
| | | |-- 1.0
| | |-- 1.0
| | | |-- 1.0
| |-- 1.0.3
| |--
| | |--
| | | |-- 1.0
| | | |--
| | | | |-- 1.1.6
| | | | | |-- 1.0.1
| | | |-- 1.0
| | | |-- <TFT_eSPI> 1.4.21
| | | | |-- 1.0
| | | | |-- 1.0
| | | | |-- 1.0
| | | | | |-- 1.0
| | | |-- 1.0.3
| | | |-- 1.0
| | | |-- 1.8.0
| | | | |-- <SD(esp32)> 1.0.5
| | | | | |-- 1.0
| | | | | |-- 1.0
| | | | |-- 1.0
| | | | |-- 1.0
| | | | | |-- 1.0
| | |--
| | | |-- 1.1.6
| | | | |-- 1.0.1
| | |-- 1.0.3
| |-- 1.2
| | |-- 1.0
| | |-- 1.0
| | | |-- 1.0
|-- 1.0.3
|--
| |--
| | |-- 1.0
| | |--
| | | |-- 1.1.6
| | | | |-- 1.0.1
| | |-- 1.0
| | |-- <TFT_eSPI> 1.4.21
| | | |-- 1.0
| | | |-- 1.0
| | | |-- 1.0
| | | | |-- 1.0
| | |-- 1.0.3
| | |-- 1.0
| | |-- 1.8.0
| | | |-- <SD(esp32)> 1.0.5
| | | | |-- 1.0
| | | | |-- 1.0
| | | |-- 1.0
| | | |-- 1.0
| | | | |-- 1.0
| |--
| | |-- 1.1.6
| | | |-- 1.0.1
| |-- 1.0.3
|--
| |-- 1.0
| |--
| | |-- 1.1.6
| | | |-- 1.0.1
| |-- 1.0
| |-- <TFT_eSPI> 1.4.21
| | |-- 1.0
| | |-- 1.0
| | |-- 1.0
| | | |-- 1.0
| |-- 1.0.3
| |-- 1.0
| |-- 1.8.0
| | |-- <SD(esp32)> 1.0.5
| | | |-- 1.0
| | | |-- 1.0
| | |-- 1.0
| | |-- 1.0
| | | |-- 1.0
Building in release mode
Compiling .pio/build/esp32dev/src/main.cpp.o
Compiling .pio/build/esp32dev/src/settings.cpp.o
In file included from lib/Display/Display.h:4:0,
from lib/InternetConnection/InternetConnection.h:10,
from src/main.cpp:2:
lib/Display/../../src/settings.cpp:14:8: error: redefinition of 'struct Settings'
struct Settings
^
In file included from lib/InternetConnection/InternetConnection.h:4:0,
from src/main.cpp:2:
lib/InternetConnection/../../src/settings.cpp:14:8: error: previous definition of 'struct Settings'
struct Settings
^
In file included from lib/Thermostat/Thermostat.h:4:0,
from lib/InternetConnection/InternetConnection.h:11,
from src/main.cpp:2:
lib/Thermostat/../../src/settings.cpp:14:8: error: redefinition of 'struct Settings'
struct Settings
^
In file included from lib/InternetConnection/InternetConnection.h:4:0,
from src/main.cpp:2:
lib/InternetConnection/../../src/settings.cpp:14:8: error: previous definition of 'struct Settings'
struct Settings
^
Compiling .pio/build/esp32dev/libaf0/Display/Display.cpp.o
Compiling .pio/build/esp32dev/lib7eb/Thermostat/Thermostat.cpp.o
Compiling .pio/build/esp32dev/libece/InternetConnection/InternetConnection.cpp.o
In file included from lib/Display/Display.h:4:0,
from lib/Thermostat/Thermostat.h:8,
from lib/Thermostat/Thermostat.cpp:1:
lib/Display/../../src/settings.cpp:14:8: error: redefinition of 'struct Settings'
struct Settings
^
In file included from lib/Thermostat/Thermostat.h:4:0,
from lib/Thermostat/Thermostat.cpp:1:
lib/Thermostat/../../src/settings.cpp:14:8: error: previous definition of 'struct Settings'
struct Settings
^
In file included from /Users/chris/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/lwip/lwip/ip_addr.h:41:0,
from /Users/chris/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/tcpip_adapter/tcpip_adapter.h:45,
from /Users/chris/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/esp32/esp_event_legacy.h:23,
from /Users/chris/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/esp_event/esp_event.h:26,
from /Users/chris/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/esp32/esp_event_loop.h:22,
from /Users/chris/.platformio/packages/framework-arduinoespressif32/libraries/WiFi/src/WiFiGeneric.h:27,
from /Users/chris/.platformio/packages/framework-arduinoespressif32/libraries/WiFi/src/WiFiSTA.h:28,
from /Users/chris/.platformio/packages/framework-arduinoespressif32/libraries/WiFi/src/WiFi.h:32,
from /Users/chris/.platformio/lib/Blynk_ID415/src/BlynkSimpleEsp32.h:23,
from lib/InternetConnection/InternetConnection.cpp:1:
/Users/chris/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/lwip/lwip/def.h:108:0: warning: "htons" redefined
#define htons(x) lwip_htons(x)
^
In file included from /Users/chris/.platformio/lib/Blynk_ID415/src/Blynk/BlynkApi.h:19:0,
from /Users/chris/.platformio/lib/Blynk_ID415/src/BlynkApiArduino.h:14,
from /Users/chris/.platformio/lib/Blynk_ID415/src/BlynkSimpleEsp32.h:20,
from lib/InternetConnection/InternetConnection.cpp:1:
/Users/chris/.platformio/lib/Blynk_ID415/src/Blynk/BlynkProtocolDefs.h:78:0: note: this is the location of the previous definition
#define htons(x) ( ((x)<<8) | (((x)>>8)&0xFF) )
^
In file included from /Users/chris/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/lwip/lwip/ip_addr.h:41:0,
from /Users/chris/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/tcpip_adapter/tcpip_adapter.h:45,
from /Users/chris/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/esp32/esp_event_legacy.h:23,
from /Users/chris/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/esp_event/esp_event.h:26,
from /Users/chris/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/esp32/esp_event_loop.h:22,
from /Users/chris/.platformio/packages/framework-arduinoespressif32/libraries/WiFi/src/WiFiGeneric.h:27,
from /Users/chris/.platformio/packages/framework-arduinoespressif32/libraries/WiFi/src/WiFiSTA.h:28,
from /Users/chris/.platformio/packages/framework-arduinoespressif32/libraries/WiFi/src/WiFi.h:32,
from /Users/chris/.platformio/lib/Blynk_ID415/src/BlynkSimpleEsp32.h:23,
from lib/InternetConnection/InternetConnection.cpp:1:
/Users/chris/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/lwip/lwip/def.h:109:0: warning: "ntohs" redefined
#define ntohs(x) lwip_ntohs(x)
^
In file included from /Users/chris/.platformio/lib/Blynk_ID415/src/Blynk/BlynkApi.h:19:0,
from /Users/chris/.platformio/lib/Blynk_ID415/src/BlynkApiArduino.h:14,
from /Users/chris/.platformio/lib/Blynk_ID415/src/BlynkSimpleEsp32.h:20,
from lib/InternetConnection/InternetConnection.cpp:1:
/Users/chris/.platformio/lib/Blynk_ID415/src/Blynk/BlynkProtocolDefs.h:83:0: note: this is the location of the previous definition
#define ntohs(x) htons(x)
^
In file included from /Users/chris/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/lwip/lwip/ip_addr.h:41:0,
from /Users/chris/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/tcpip_adapter/tcpip_adapter.h:45,
from /Users/chris/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/esp32/esp_event_legacy.h:23,
from /Users/chris/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/esp_event/esp_event.h:26,
from /Users/chris/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/esp32/esp_event_loop.h:22,
from /Users/chris/.platformio/packages/framework-arduinoespressif32/libraries/WiFi/src/WiFiGeneric.h:27,
from /Users/chris/.platformio/packages/framework-arduinoespressif32/libraries/WiFi/src/WiFiSTA.h:28,
from /Users/chris/.platformio/packages/framework-arduinoespressif32/libraries/WiFi/src/WiFi.h:32,
from /Users/chris/.platformio/lib/Blynk_ID415/src/BlynkSimpleEsp32.h:23,
from lib/InternetConnection/InternetConnection.cpp:1:
/Users/chris/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/lwip/lwip/def.h:110:0: warning: "htonl" redefined
#define htonl(x) lwip_htonl(x)
^
In file included from /Users/chris/.platformio/lib/Blynk_ID415/src/Blynk/BlynkApi.h:19:0,
from /Users/chris/.platformio/lib/Blynk_ID415/src/BlynkApiArduino.h:14,
from /Users/chris/.platformio/lib/Blynk_ID415/src/BlynkSimpleEsp32.h:20,
from lib/InternetConnection/InternetConnection.cpp:1:
/Users/chris/.platformio/lib/Blynk_ID415/src/Blynk/BlynkProtocolDefs.h:79:0: note: this is the location of the previous definition
#define htonl(x) ( ((x)<<24 & 0xFF000000UL) |
^
In file included from /Users/chris/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/lwip/lwip/ip_addr.h:41:0,
from /Users/chris/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/tcpip_adapter/tcpip_adapter.h:45,
from /Users/chris/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/esp32/esp_event_legacy.h:23,
from /Users/chris/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/esp_event/esp_event.h:26,
from /Users/chris/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/esp32/esp_event_loop.h:22,
from /Users/chris/.platformio/packages/framework-arduinoespressif32/libraries/WiFi/src/WiFiGeneric.h:27,
from /Users/chris/.platformio/packages/framework-arduinoespressif32/libraries/WiFi/src/WiFiSTA.h:28,
from /Users/chris/.platformio/packages/framework-arduinoespressif32/libraries/WiFi/src/WiFi.h:32,
from /Users/chris/.platformio/lib/Blynk_ID415/src/BlynkSimpleEsp32.h:23,
from lib/InternetConnection/InternetConnection.cpp:1:
/Users/chris/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/lwip/lwip/def.h:111:0: warning: "ntohl" redefined
#define ntohl(x) lwip_ntohl(x)
^
In file included from /Users/chris/.platformio/lib/Blynk_ID415/src/Blynk/BlynkApi.h:19:0,
from /Users/chris/.platformio/lib/Blynk_ID415/src/BlynkApiArduino.h:14,
from /Users/chris/.platformio/lib/Blynk_ID415/src/BlynkSimpleEsp32.h:20,
from lib/InternetConnection/InternetConnection.cpp:1:
/Users/chris/.platformio/lib/Blynk_ID415/src/Blynk/BlynkProtocolDefs.h:84:0: note: this is the location of the previous definition
#define ntohl(x) htonl(x)
^
In file included from lib/Display/Display.h:4:0,
from lib/InternetConnection/InternetConnection.h:10,
from lib/InternetConnection/InternetConnection.cpp:2:
lib/Display/../../src/settings.cpp:14:8: error: redefinition of 'struct Settings'
struct Settings
^
In file included from lib/InternetConnection/InternetConnection.h:4:0,
from lib/InternetConnection/InternetConnection.cpp:2:
lib/InternetConnection/../../src/settings.cpp:14:8: error: previous definition of 'struct Settings'
struct Settings
^
*** [.pio/build/esp32dev/src/main.cpp.o] Error 1
*** [.pio/build/esp32dev/lib7eb/Thermostat/Thermostat.cpp.o] Error 1
In file included from lib/Thermostat/Thermostat.h:4:0,
from lib/InternetConnection/InternetConnection.h:11,
from lib/InternetConnection/InternetConnection.cpp:2:
lib/Thermostat/../../src/settings.cpp:14:8: error: redefinition of 'struct Settings'
struct Settings
^
In file included from lib/InternetConnection/InternetConnection.h:4:0,
from lib/InternetConnection/InternetConnection.cpp:2:
lib/InternetConnection/../../src/settings.cpp:14:8: error: previous definition of 'struct Settings'
struct Settings
^
*** [.pio/build/esp32dev/libece/InternetConnection/InternetConnection.cpp.o] Error 1
================================================================================ [FAILED] Took 5.14 seconds ================================================================================
The terminal process terminated with exit code: 1
Terminal will be reused by tasks, press any key to close it.