Go Down

Topic: Compile error: multiple definition of `__vector_13' (Read 1 time) previous topic - next topic


C:\Program Files\Arduino\libraries\Tlc5940/Tlc5940.cpp:62: multiple definition of `__vector_13'
C:\DOCUME~1\greg\LOCALS~1\Temp\build891807187282257886.tmp\Timer1\TimerOne.cpp.o:C:\Program Files\Arduino\libraries\Timer1/TimerOne.cpp:44: first defined here
collect2.exe: error: ld returned 1 exit status
Error compiling.

The cause of this is the fact that I have these two includes in my .ino file:

#include <TimerOne.h>
#include <Tlc5940.h>

But I need both of them.

So any suggestions on how I can work around it?


I think they both use the same interrupt or same timer.


Yes, but if I leave out #include <timer1.h> then I get a compile error "Timer1 not declared in this scope' in my .ino file.

I also tried forward declaring the Timer class and the extern Timer1.... but I still get compile errors.


There is only one timer 1. If the TLC5940 class is using the timer, it will NOT be available for you to use with the TimerOne library.
The art of getting good answers lies in asking good questions.

Go Up