LowPowerLab Forum

Hardware support => Low Power Techniques => Topic started by: [email protected] on October 11, 2024, 12:29:21 PM

Title: Getting linking error, multiple def of __vector_6
Post by: [email protected] on October 11, 2024, 12:29:21 PM
Hi, I'm using ver 2.2 of the LowPower_LowPowerLab library and am getting a linking error with my code, but not with the the TxRxBlinky.ino example from LowPowerLabs that uses the same library.  I've removed and reinstalled it...no change.  The error message below is probably very clear....but I don't understand what to do....I've limited experience with c/c++ .  My code is attached....it is just the initial plumbing for a project but is too long to insert.  I'm also attaching the verbose compile that results in the error.  Any help would be much appreciated! Thanks.....jim

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)

Error linking for board Moteino(-USB)(Moteino_moteino_avr_Moteino)
Debug build failed for project 'FOB_transmitter'
(.text+0x0)*: multiple definition of __vector_6
FOB_transmitter.cpp.o (symbol from plugin)*: (.text+0x0): first defined here

collect2.exe*: error: ld returned 1 exit status

Title: Re: Getting linking error, multiple def of __vector_6
Post by: Felix on October 12, 2024, 11:37:35 AM
Does this happen with vanilla library and unmodified library example?
What IDE version?
Title: Re: Getting linking error, multiple def of __vector_6
Post by: [email protected] on October 14, 2024, 03:34:32 PM
Felix, thanks for the reply.  It is not happening with the unmodified library example.  I compiled IdleWakerPeriodic ok, then added the libraries that are in my code (below)....still compiled ok.  The IDE I'm using is  is 1.8.19.  I get the error if I compile through the Arduino IDE and with through visual studio 2022 ver 17.0.  Thx for your input....jim

#include <LowPower.h>
#include <PinChangeInterrupt.h>
#include <PinChangeInterruptBoards.h>
#include <PinChangeInterruptPins.h>
#include <PinChangeInterruptSettings.h>
#include <RFM69registers.h>
#include <RFM69.h>
#include <avr/interrupt.h>
#include <SPI.h>
Title: Re: Getting linking error, multiple def of __vector_6
Post by: Felix on October 14, 2024, 10:40:50 PM
Looks like a duplicate declaration of an interrupt or something like that.
"__vector_6" I think is what this points at, somewhere in all those interrupts libraries. You will have to dig that down depending on the libraries you want to inject.