nasys / badgerboard

5 stars 3 forks source link

Included copies of FaBo HTS221 and LowPower libraries break compiling of sketches that use the originals #3

Closed avbentem closed 7 years ago

avbentem commented 7 years ago

The Badgerboard core library includes a copy of https://github.com/FaBoPlatform/FaBoHumidity-HTS221-Library When compiling unrelated other sketches that rely on that library, in an Arduino IDE into which the Badgerboard library has been installed as well (but which do not use the Badgerboard library in the sketch), I get:

libraries/badgerboard/badger.cpp.o (symbol from plugin): In function `sodaq_wdt_enable(wdt_period)':
(.text+0x0): multiple definition of `faboHumidity'
sketch/humidity.ino.cpp.o (symbol from plugin):(.text+0x0): first defined here
collect2: error: ld returned 1 exit status
Multiple libraries were found for "FaBoHumidity_HTS221.h"
Used: /Users/arjan/Arduino/libraries/badgerboard
Not used: /Users/arjan/Arduino/libraries/FaBo_208_Humidity_HTS221

Also, someone else commented on The Things Network that the same applied to https://github.com/rocketscream/Low-Power:

I got errors compiling older sketches after installing the badgerboard library because they included some kind of incompatible LowPower library. I had to remove the badgerboard/src/lowpower.h and badgerboard/src/lowpower.cpp file to get my old sketches to work again.

This makes me wonder if it might also apply to https://github.com/SodaqMoja/Sodaq_RN2483

Renaming the copies will probably solve the issue?

KertIlm commented 7 years ago

Hi,

Changed the library names (added _mod) to fix this issue