HOW I FIX IT ? Multiple libraries were found for "IRremote.h"

HOW I FIX IT ?

Multiple libraries were found for "IRremote.h"

:confused:

You seem to have 2 libraries. The included robotIRremote and the one you added Irremote. The IDE is confusing them and not sure which one to use. Since You will most likely never use the RobotIRremote library, and because the robot is discontinued, you can go to

/Applications/Arduino.app/Contents/Java/libraries

and delete the file RobotIRremote

thank you, it's great. :smiley:

To get to "Contents" via the Finder, Ctrl-click on the Arduino.app icon and select "Show Package Contents".

"C:\Users\AAa\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.8.1-arduino5/bin/avr-gcc" -Os -Wl,--gc-sections -mmcu=attiny85 -o "C:\Users\AAa\AppData\Local\Temp\arduino_build_743427/Digispark-IR-relay.ino.elf" "C:\Users\AAa\AppData\Local\Temp\arduino_build_743427\sketch\Digispark-IR-relay.ino.cpp.o" "C:\Users\AAa\AppData\Local\Temp\arduino_build_743427\libraries\Irremote\IRremote.cpp.o" "C:\Users\AAa\AppData\Local\Temp\arduino_build_743427\libraries\Irremote\irPronto.cpp.o" "C:\Users\AAa\AppData\Local\Temp\arduino_build_743427\libraries\Irremote\irRecv.cpp.o" "C:\Users\AAa\AppData\Local\Temp\arduino_build_743427\libraries\Irremote\irSend.cpp.o" "C:\Users\AAa\AppData\Local\Temp\arduino_build_743427\libraries\Irremote\ir_Aiwa.cpp.o" "C:\Users\AAa\AppData\Local\Temp\arduino_build_743427\libraries\Irremote\ir_Denon.cpp.o" "C:\Users\AAa\AppData\Local\Temp\arduino_build_743427\libraries\Irremote\ir_Dish.cpp.o" "C:\Users\AAa\AppData\Local\Temp\arduino_build_743427\libraries\Irremote\ir_JVC.cpp.o" "C:\Users\AAa\AppData\Local\Temp\arduino_build_743427\libraries\Irremote\ir_LG.cpp.o" "C:\Users\AAa\AppData\Local\Temp\arduino_build_743427\libraries\Irremote\ir_Lego_PF.cpp.o" "C:\Users\AAa\AppData\Local\Temp\arduino_build_743427\libraries\Irremote\ir_Mitsubishi.cpp.o" "C:\Users\AAa\AppData\Local\Temp\arduino_build_743427\libraries\Irremote\ir_NEC.cpp.o" "C:\Users\AAa\AppData\Local\Temp\arduino_build_743427\libraries\Irremote\ir_Panasonic.cpp.o" "C:\Users\AAa\AppData\Local\Temp\arduino_build_743427\libraries\Irremote\ir_RC5_RC6.cpp.o" "C:\Users\AAa\AppData\Local\Temp\arduino_build_743427\libraries\Irremote\ir_Samsung.cpp.o" "C:\Users\AAa\AppData\Local\Temp\arduino_build_743427\libraries\Irremote\ir_Sanyo.cpp.o" "C:\Users\AAa\AppData\Local\Temp\arduino_build_743427\libraries\Irremote\ir_Sharp.cpp.o" "C:\Users\AAa\AppData\Local\Temp\arduino_build_743427\libraries\Irremote\ir_Sony.cpp.o" "C:\Users\AAa\AppData\Local\Temp\arduino_build_743427\libraries\Irremote\ir_Template.cpp.o" "C:\Users\AAa\AppData\Local\Temp\arduino_build_743427\libraries\Irremote\ir_Whynter.cpp.o" "C:\Users\AAa\AppData\Local\Temp\arduino_build_743427\core\pins_arduino.c.o" "C:\Users\AAa\AppData\Local\Temp\arduino_build_743427\core\core.a" "-LC:\Users\AAa\AppData\Local\Temp\arduino_build_743427" -lm
c:/users/aaa/appdata/local/arduino15/packages/arduino/tools/avr-gcc/4.8.1-arduino5/bin/../lib/gcc/avr/4.8.1/../../../../avr/bin/ld.exe: C:\Users\AAa\AppData\Local\Temp\arduino_build_743427/Digispark-IR-relay.ino.elf section .text' will not fit in region text'

c:/users/aaa/appdata/local/arduino15/packages/arduino/tools/avr-gcc/4.8.1-arduino5/bin/../lib/gcc/avr/4.8.1/../../../../avr/bin/ld.exe: region `text' overflowed by 826 bytes

collect2.exe: error: ld returned 1 exit status

Multiple libraries were found for "IRremote.h"
Used: C:\Program
Using library Irremote at version 2.2.3 in folder: C:\Program Files\Arduino\libraries\Irremote
exit status 1
Error compiling for board Digispark (Default - 16.5mhz).

Due to the bug with printing the locations of multiple library files in 1.8.10, it's hard to say whether waldzayed's compilation is actually using the right library or not. But the actual problem that's stopping compilation is not that - which leads me to think that his IDE is selecting the correct version of the library, because again, I would expect it to error out in that case, as the selected board is based on the tiny85, and a library not designed for the tiny85 would be expected to fail with a bunch of errors about undefined references to registers that don't exist on the tiny. The actual error stopping compilation is simply that the sketch does not fit in the flash of the selected board...

In original post, the correct version of the library is in fact being used (were it not, there would be a compilation error mentioning an undefined pin name that only exists for that robot board def) - there's no problem shown in that message. The multiple versions of a library thing is only a problem if it is selecting the wrong version.

So what is the fix I have a similar problem and I can't figure out how to solve it or ignore the message and upload the sketch. I don't know what I am missing.

My error

collect2.exe: error: ld returned 1 exit status

Multiple libraries were found for "Wire.h"
Used: C:\Program
Multiple libraries were found for "LiquidCrystal_I2C.h"
Used: C:\Users\Adamos\Documents\Arduino\libraries\NewLiquidCrystal_lib
exit status 1
Error compiling for board Arduino/Genuino Uno.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

I keep having the same problems and I can't find the Multiple libraries.

Hi
Here is the read out from my Uno, Red writing at the bottom.

C:\Users\JIM\Documents\Arduino\libraries\AF_Motor\AFMotor.cpp:7:10: fatal error: WProgram.h: No such file or directory

Multiple libraries were found for "AFMotor.h"
 #include "WProgram.h"

 Used: C:\Users\JIM\Documents\Arduino\libraries\AF_Motor
          ^~~~~~~~~~~~

compilation terminated.

exit status 1
Error compiling for board Arduino Uno.

This is happening a lot and in particular with Sketches involving DC Motors.
Maybe the sketch would also help?

#include <AFMotor.h>


AF_DCMotor motor(1, MOTOR12_64KHZ); // create motor #2
64KHz pwm

void setup() {
  Serial.begin(9600);  // set up Serial library at 9600 bps
  
Serial.println("Motor test!");
  
  
motor.setSpeed(200);     // set the speed to 200/255

}


void loop() {
  
Serial.print("tick");
  
  
motor.run(FORWARD);      // turn it on going forward
  
delay(1000);

  
Serial.print("tock");
  
motor.run(BACKWARD);     // the other way
  
delay(1000);
  
  
Serial.print("tack");
  
motor.run(RELEASE);      // stopped
  delay(1000);
}

Thank you