Erreur compilation arduino

Bonjour, j'utilise la carte Arduino Mega 2560, et lors de la compilation j'ai reçu ce message d'erreur (assez long) :

libraries\Servo\avr\Servo.cpp.o (symbol from plugin): In function ServoCount': (.text+0x0): multiple definition of ServoCount'
sketch\Servo.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries\Servo\avr\Servo.cpp.o (symbol from plugin): In function ServoCount': (.text+0x0): multiple definition of __vector_17'
sketch\Servo.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries\Servo\avr\Servo.cpp.o (symbol from plugin): In function ServoCount': (.text+0x0): multiple definition of __vector_32'
sketch\Servo.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries\Servo\avr\Servo.cpp.o (symbol from plugin): In function ServoCount': (.text+0x0): multiple definition of __vector_42'
sketch\Servo.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries\Servo\avr\Servo.cpp.o (symbol from plugin): In function ServoCount': (.text+0x0): multiple definition of __vector_47'
sketch\Servo.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries\Servo\avr\Servo.cpp.o (symbol from plugin): In function ServoCount': (.text+0x0): multiple definition of Servo::Servo()'
sketch\Servo.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries\Servo\avr\Servo.cpp.o (symbol from plugin): In function ServoCount': (.text+0x0): multiple definition of Servo::Servo()'
sketch\Servo.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries\Servo\avr\Servo.cpp.o (symbol from plugin): In function ServoCount': (.text+0x0): multiple definition of Servo::attach(int, int, int)'
sketch\Servo.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries\Servo\avr\Servo.cpp.o (symbol from plugin): In function ServoCount': (.text+0x0): multiple definition of Servo::attach(int)'
sketch\Servo.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries\Servo\avr\Servo.cpp.o (symbol from plugin): In function ServoCount': (.text+0x0): multiple definition of Servo::detach()'
sketch\Servo.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries\Servo\avr\Servo.cpp.o (symbol from plugin): In function ServoCount': (.text+0x0): multiple definition of Servo::writeMicroseconds(int)'
sketch\Servo.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries\Servo\avr\Servo.cpp.o (symbol from plugin): In function ServoCount': (.text+0x0): multiple definition of Servo::write(int)'
sketch\Servo.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries\Servo\avr\Servo.cpp.o (symbol from plugin): In function ServoCount': (.text+0x0): multiple definition of Servo::readMicroseconds()'
sketch\Servo.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries\Servo\avr\Servo.cpp.o (symbol from plugin): In function ServoCount': (.text+0x0): multiple definition of Servo::read()'
sketch\Servo.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries\Servo\avr\Servo.cpp.o (symbol from plugin): In function ServoCount': (.text+0x0): multiple definition of Servo::attached()'
sketch\Servo.cpp.o (symbol from plugin):(.text+0x0): first defined here
collect2.exe: error: ld returned 1 exit status
exit status 1
Erreur de compilation pour la carte Arduino Mega or Mega 2560

Quelqu'un comprend-t-il d'où vient le problème et peut-il m'apporter une solution ?
Merci d'avance

La librairie Servo.cpp serait présente dans 2 répertoires:

  • libraries\Servo\avr\Servo.cpp.
  • sketch\Servo.cpp

Tu n'aurais pas copié les fichiers de la librairie dans le répertoire contenant ton sketch par hasard?

J'ai beau chercher mais je ne vois qu'un seul répertoire où se trouve ma librairie Servo.cpp .

Avez vous 2 .ino dans votre répertoire de travail ?

Montrez nous ce qu’il y a dans votre répertoire du sketch ainsi que le code que vous utilisez.

Bonjour, dans mon répertoire, il n'y a que mon sketch et les deux librairies que j'utilise (qui sont uniquement dans ce répertoire et nulle part ailleurs). Je joint ci-dessous une capture d'écran de mon répertoire afin que vous puissiez constater par vous-même.

virez Servo.h et Servo.cpp de votre répertoire. La bibliothèque est rangée dans le répertoire des bibliothèques partagées (libraries\Servo\avr)

Merci, c'était en effet cela le problème, ça marche mieux maintenant.

c'est @fdufnews qui avait vu juste !

je marque son post en solution.