Library conflict

Hello everyone,

I am trying to use a MPR121 to trigger sounds from Mozzi library but when I use Wire library with Mozzi library in the same sketch it crash.

when i add #include <Wire.h> i got this compilation error:

libraries\Wire\utility\twi.c.o: In function `__vector_24':

C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire\src\utility/twi.c:384: multiple definition of `__vector_24'

libraries\Mozzi-master\twi_nonblock.cpp.o:C:\Program Files (x86)\Arduino\libraries\Mozzi-master/twi_nonblock.cpp:456: first defined here

collect2.exe: error: ld returned 1 exit status

exit status 1
Error compiling for board Arduino/Genuino Uno.

How could I solve this?
Many thanks

multiple definition of `__vector_24'

Both libraries are trying to use the same interrupt, That is never going to work.

There is a small chance that the problem can be worked around but don't hold your breath

Please post a complete program that demonstrates the problem and links to the libraries used

Probably the easiest way to work around these two libraries competing for the same interrupt is to replace the Wire library with the SoftWire library which is a software implementation and can use other pins for SCL/SDA.


I’m having the same issue. Did you manage to make it work?