user35284: It keeps on giving me the error:
Error compiling for board Arduino/Genuino Mega or Mega 2560. 

Other sketches work fine, but this one will not compile, even though I have all the libraries.
Here is the link for the code: 
https://drive.google.com/open?id=0B3R5NMiGZ3RPSk9WS0Y1amtEYms
The full error:
Arduino: 1.8.3 (Windows 10), Board: "Arduino/Genuino 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\IRLibRecv\IRLibRecv.cpp.o (symbol from plugin):(.text+0x0): first defined here

d:/arduino/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/bin/ld.exe: Disabling relaxation: it will not work with multiple definitions

collect2.exe: error: ld returned 1 exit status

exit status 1 Error compiling for board Arduino/Genuino Mega or Mega
2560.

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


user4143: There are a number of issues with your code besides the actual error:

You are dividing an unsigned long by an integer which results in an unsigned long, then rounding it. Makes no sense.
You are assigning (I assume - without seeing your code I can't be sure) long constants (eg 0xFFE01F) to an integer - which overflows and whinges.

However your main problem is that you have two interrupt service routines (ISRs) for the same interrupt (vector 7). What that interrupt is I can't say, since it is different on different chips, and you don't seem able to make your mind up if you're using an Uno or a Mega (you tagged your question both for some reason). So you will have to change code and/or libraries to use different interrupts or combine the two together to use just one ISR.

35284: <p>It keeps on giving me the error:</p>

<pre><code>Error compiling for board Arduino/Genuino Mega or Mega 2560. 
</code></pre>

<p>Other sketches work fine, but this one will not compile, even though I have all the libraries.</p>

<p>Here is the link for the code: 
<a href="https://drive.google.com/open?id=0B3R5NMiGZ3RPSk9WS0Y1amtEYms" rel="nofollow noreferrer">https://drive.google.com/open?id=0B3R5NMiGZ3RPSk9WS0Y1amtEYms</a></p>

<p>The full error:</p>

<pre><code>Arduino: 1.8.3 (Windows 10), Board: "Arduino/Genuino 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\IRLibRecv\IRLibRecv.cpp.o (symbol from plugin):(.text+0x0): first defined here

d:/arduino/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/bin/ld.exe: Disabling relaxation: it will not work with multiple definitions

collect2.exe: error: ld returned 1 exit status

exit status 1 Error compiling for board Arduino/Genuino Mega or Mega
2560.

This report would have more information with "Show verbose output during compilation" option enabled in File -&gt; Preferences.
</code></pre>
 4143: <p>There are a number of issues with your code besides the actual error:</p>

<ul>
<li>You are dividing an unsigned long by an integer which results in an unsigned long, then rounding it. Makes no sense.</li>
<li>You are assigning (I assume - without seeing your code I can't be sure) long constants (eg <code>0xFFE01F</code>) to an integer - which overflows and whinges.</li>
</ul>

<p>However your main problem is that you have two interrupt service routines (ISRs) for the same interrupt (vector 7). What that interrupt is I can't say, since it is different on different chips, and you don't seem able to make your mind up if you're using an Uno or a Mega (you tagged your question both for some reason). So you will have to change code and/or libraries to use different interrupts or combine the two together to use just one ISR.</p>
