rocketscream / Low-Power

Low Power Library for Arduino
www.rocketscream.com
1.26k stars 345 forks source link

Compile problem: multiple definition of `__vector_6' #80

Open andreas-bulling opened 5 years ago

andreas-bulling commented 5 years ago
libraries/Low-Power-master/LowPower.cpp.o (symbol from plugin): In function `LowPowerClass::idle(period_t, adc_t, timer2_t, timer1_t, timer0_t, spi_t, usart0_t, twi_t)':
(.text+0x0): multiple definition of `__vector_6'
sketch/sensor_mysensor.ino.cpp.o (symbol from plugin):(.text+0x0): first defined here
collect2: error: ld returned 1 exit status
exit status 1
Error compiling for board Arduino Pro or Pro Mini.
rocketscream commented 5 years ago

Are you using any other library that possibly accessing the same interrupt vector? What version of the Arduino AVR board support are you using?

bkrajendra commented 4 years ago

Hi I am using this with MySensor Library which might be using Interrupts. any possible solution to resolve this issue.?

HiFiJ commented 4 years ago

Hi everyone,

I get the exact compilation error when trying to use it with MySensors 2.3.2 for Arduino Pro Mini. Is there any workaround possible? Thanks very much for your efforts, Joost

cYnd commented 4 years ago

Hi all,

I want to use this library with the radiohead encrypted rf95 server and I am running in the same problem. Is there any possible workaround?

robwilkes commented 4 years ago

Hi all,

I want to use this library with the radiohead encrypted rf95 server and I am running in the same problem. Is there any possible workaround?

Yes I just came across this same thing. I can enable RadioHead RH_ENABLE_ENCRYPTION_MODULE, or I can use Low-Power, I cannot use both else it conflicts.

libraries\Crypto\RNG.cpp.o (symbol from plugin): In function `__vector_6':

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

libraries\Low-Power\LowPower.cpp.o (symbol from plugin):(.text+0x0): first defined here

collect2.exe: error: ld returned 1 exit status

exit status 1
Error compiling for board 
eldiamond2 commented 3 years ago

Go to LowPower.cpp, find this lines

ISR (WDT_vect)
{
    // WDIE & WDIF is cleared in hardware upon entering this ISR
    wdt_disable();
}

and comment it

ICPete commented 1 week ago

I know this thread is 4 years stale, but thank you, eldiamond2; your solution helped me!!