GreyGnome / EnableInterrupt

New Arduino interrupt library, designed for Arduino Uno/Mega 2560/Leonardo/Due
329 stars 73 forks source link

multiple definition of `__vector_1' when compiling with MySensors #33

Closed markappa closed 8 years ago

markappa commented 8 years ago

I am getting this errors:

C:\Users\marco\AppData\Local\Temp\buildca530f920e52af2e7c8f67a769a556af.tmp/core\core.a(WInterrupts.c.o): In function `__vector_1':
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/WInterrupts.c:309: multiple definition of `__vector_1'
sketch\MySensor_Keypad.ino.cpp.o:C:\Users\marco\Documents\MySensors\libraries\EnableInterrupt/EnableInterrupt.h:1284: first defined here

C:\Users\marco\AppData\Local\Temp\buildca530f920e52af2e7c8f67a769a556af.tmp/core\core.a(WInterrupts.c.o): In function `nothing':
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/WInterrupts.c:35: multiple definition of `__vector_2'
sketch\MySensor_Keypad.ino.cpp.o:C:\Users\marco\Documents\MySensors\libraries\EnableInterrupt/EnableInterrupt.h:1011: first defined here

I did not figure out easily how __vector_1 and __vector_2 are defined/used since there are preprocessor macros involved.

Any idea on how to solve? Thank you!

markappa commented 8 years ago

Ok, I saw some discussion on this issue here. Since I am not using internal interrupts, I resolved adding these lines in my sketch:

#define EI_NOTINT0
#define EI_NOTINT1
GreyGnome commented 8 years ago

Well that was quick- Nice work! Glad to see the library was able to handle the situation.