Error compiling for board Arduino Mega or Mega 2560

I compiled my code, it worked fine. Then I made a few minor changes, compiled, and it gave me the above error. Here's the full error message:

Arduino: 1.8.12 (Windows 10), Board: "Arduino Mega or Mega 2560, ATmega2560 (Mega 2560)"

Tone.cpp.o (symbol from plugin): In function `timer0_pin_port':

(.text+0x0): multiple definition of `__vector_13'

libraries\IRremote\IRremote.cpp.o (symbol from plugin):(.text+0x0): first defined here

c:/program files (x86)/arduino/hardware/tools/avr/bin/../lib/gcc/avr/7.3.0/../../../../avr/bin/ld.exe: Disabling relaxation: it will not work with multiple definitions

collect2.exe: error: ld returned 1 exit status

Multiple libraries were found for "Servo.h"
 Used: C:\Users\aaric\OneDrive\Documents\Arduino\libraries\Servo
 Not used: C:\Program Files (x86)\Arduino\libraries\Servo
exit status 1
Error compiling for board Arduino Mega or Mega 2560.

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

I looked at what other people were saying about this. For them, installing a different version of Arduino AVR boards seemed to help. I tried that, restarted the program, but got the same error message. I am using the latest version of Arduino, 1.8.12. I tried uninstalling and reinstalling the IDE as well, but nothing doing. It is very possible that I'm missing something obvious, I'm pretty new to this. Because this seems to be an IDE error, I don't think the code is helpful. But if you disagree, I'd be happy to post it.

Thanks in advance!

It's something obvious if you can translate the message :wink: It's also not a minor change if you add additional hardware, what is what you seem to have done.

You have an interrupt conflict where both tone and IRremote want to use the same timer. Here is a full description how to approach the problem: Compilation Error - #4 by sterretje - Programming Questions - Arduino Forum. It was written for the 328P processor but you can use the same approach for the Mega.

Note that if you want to modify the IRremote library, the file that you nowadays have to modify is boarddefs.h. See Libraries incompatible: IRemote.cpp vs. NewPing.cpp - #18 by sterretje - Programming Questions - Arduino Forum.

Thank you very much! And that's a good point - adding a component (in this case a passive buzzer) should never be considered a minor change. Since the passive buzzer is not crucial to my project, I'll remove it and use an active buzzer, which doesn't require the pitches.h library. Thanks for the quick response!