Problema compilazione, exit status 1.

Ecco lo shetch:

#include <MySQL_Connection.h>
#include <SPI.h>
#include <Ethernet2.h>
#include <LiquidCrystal.h>
byte mac_addr[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
IPAddress ip(192,168,1, 177);
IPAddress server_addr(35,157,16,43);
char user[] = "username";
char password[] = "passsword";

EthernetClient client;
MySQL_Connection conn((Client *)&client);
LiquidCrystal lcd(9,8,7,6,5,4);
void setup() {
  Ethernet.begin(mac_addr, ip);
  lcd.begin(16, 2);
  lcd.print("hello, world!");
  if (conn.connect(server_addr, 3306, user, password)) {
    delay(1000);
  }
  else
  conn.close();
}


void loop() {
}

Ed ecco l’errore:

Arduino:1.8.1 (Windows 10), Scheda:"Arduino/Genuino Uno"

Opzioni di compilazione cambiate, ricompilo tutto
In file included from C:\Program Files (x86)\Arduino\libraries\Ethernet\src/utility/socket.h:4:0,

                 from C:\Users\Lorenzo\Desktop\dev\Arduino\libraries\Ethernet2\src\utility\socket.cpp:8:

C:\Program Files (x86)\Arduino\libraries\Ethernet\src/utility/w5100.h:50:7: error: redefinition of 'class SnMR'

 class SnMR {

       ^

In file included from C:\Users\Lorenzo\Desktop\dev\Arduino\libraries\Ethernet2\src\utility\socket.cpp:7:0:

C:\Users\Lorenzo\Desktop\dev\Arduino\libraries\Ethernet2\src/utility/w5500.h:50:7: error: previous definition of 'class SnMR'

 class SnMR {

       ^

In file included from C:\Program Files (x86)\Arduino\libraries\Ethernet\src/utility/socket.h:4:0,

                 from C:\Users\Lorenzo\Desktop\dev\Arduino\libraries\Ethernet2\src\utility\socket.cpp:8:

C:\Program Files (x86)\Arduino\libraries\Ethernet\src/utility/w5100.h:62:6: error: multiple definition of 'enum SockCMD'

 enum SockCMD {

      ^

In file included from C:\Users\Lorenzo\Desktop\dev\Arduino\libraries\Ethernet2\src\utility\socket.cpp:7:0:

C:\Users\Lorenzo\Desktop\dev\Arduino\libraries\Ethernet2\src/utility/w5500.h:62:6: error: previous definition here

 enum SockCMD {

      ^

In file included from C:\Program Files (x86)\Arduino\libraries\Ethernet\src/utility/socket.h:4:0,

                 from C:\Users\Lorenzo\Desktop\dev\Arduino\libraries\Ethernet2\src\utility\socket.cpp:8:

C:\Program Files (x86)\Arduino\libraries\Ethernet\src/utility/w5100.h:88:7: error: redefinition of 'class SnIR'

 class SnIR {

       ^

In file included from C:\Users\Lorenzo\Desktop\dev\Arduino\libraries\Ethernet2\src\utility\socket.cpp:7:0:

C:\Users\Lorenzo\Desktop\dev\Arduino\libraries\Ethernet2\src/utility/w5500.h:88:7: error: previous definition of 'class SnIR'

 class SnIR {

       ^

In file included from C:\Program Files (x86)\Arduino\libraries\Ethernet\src/utility/socket.h:4:0,

                 from C:\Users\Lorenzo\Desktop\dev\Arduino\libraries\Ethernet2\src\utility\socket.cpp:8:

C:\Program Files (x86)\Arduino\libraries\Ethernet\src/utility/w5100.h:97:7: error: redefinition of 'class SnSR'

 class SnSR {

       ^

In file included from C:\Users\Lorenzo\Desktop\dev\Arduino\libraries\Ethernet2\src\utility\socket.cpp:7:0:

C:\Users\Lorenzo\Desktop\dev\Arduino\libraries\Ethernet2\src/utility/w5500.h:97:7: error: previous definition of 'class SnSR'

 class SnSR {

       ^

In file included from C:\Program Files (x86)\Arduino\libraries\Ethernet\src/utility/socket.h:4:0,

                 from C:\Users\Lorenzo\Desktop\dev\Arduino\libraries\Ethernet2\src\utility\socket.cpp:8:

C:\Program Files (x86)\Arduino\libraries\Ethernet\src/utility/w5100.h:116:7: error: redefinition of 'class IPPROTO'

 class IPPROTO {

       ^

In file included from C:\Users\Lorenzo\Desktop\dev\Arduino\libraries\Ethernet2\src\utility\socket.cpp:7:0:

C:\Users\Lorenzo\Desktop\dev\Arduino\libraries\Ethernet2\src/utility/w5500.h:116:7: error: previous definition of 'class IPPROTO'

 class IPPROTO {

       ^

exit status 1
Errore durante la compilazione per la scheda Arduino/Genuino Uno.

Questo report potrebbe essere più ricco di informazioni abilitando l'opzione
"Mostra un output dettagliato durante la compilazione"
in "File -> Impostazioni"

Qual’è il problema? Ho aggiornato l’ide all’ultima versione.

Edit:
ho trovato questo… potrebbe essere questo il problema ? https://github.com/arduino-org/Arduino/issues/79

Aggiornamento: se tolgo #include <Ethernet2.h> dallo sketch tutto funziona… sto cercando di capirci qualcosa.

Immagino che in MySQL_Connection.h ci sia un #include <Ethernet.h>, prova a sostituirlo con Ethernet2.h, se sei sicuro di avere questo shield.

come faccio a sostituirlo ?

Apri il file col Blocco Note?

Grazie mille!! Ha funzionato.