SparkFun Forums 

Where electronics enthusiasts find answers.

Hardware or product specific questions are best asked here.
User avatar
By prittenhouse
#228641
Hi,

I am trying to compile the 'BasicReadings' example for the LIS2DH12 with my Board set to the Artemis Dev Kit. I am getting a bunch of multiple definition errors like:
Code: Select all
c:/users/lyla caudle/appdata/local/arduino15/packages/sparkfun/tools/arm-none-eabi-gcc/8-2018-q4-major/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld.exe: C:\Users\Lyla Caudle\AppData\Local\Arduino15\packages\SparkFun\hardware\apollo3\2.1.1\variants\SFE_ARTEMIS_DK/mbed/libmbed-os.a(lis2dh12_reg.o): in function `lis2dh12_write_reg':

lis2dh12_reg.c:(.text.lis2dh12_write_reg+0x0): multiple definition of `lis2dh12_write_reg'; libraries\SparkFun_LIS2DH12_Arduino_Library\lis2dh12_reg.cpp.o:lis2dh12_reg.cpp:(.text.lis2dh12_write_reg+0x0): first defined here
If I am reading this right it looks like the apollo3 package has its own copy of the library which is creating the conflict.

Any suggestions on how to resolve it?

Thanks,
Phil
User avatar
By prittenhouse
#228653
Yah, I saw that post but I don't think that's the problem here. I don't see any includes like that in the demo code. Presumably this code normally compiles for other boards so I suspect it is a problem specific to the Artemis
User avatar
By prittenhouse
#228673
prittenhouse wrote: Fri Sep 24, 2021 1:53 pm Presumably this code normally compiles for other boards so I suspect it is a problem specific to the Artemis
Sorry, I meant to say I suspect the problem is specific to the Apollo 3 Arduino library. Has anyone build this example with the latest libraries recently?

Thanks,
Phil
User avatar
By prittenhouse
#228674
Hmmmm... it seems I can't edit my post. Let me try again

I meant to say I suspect the problem is related to the Artemis Arduino library. Has anyone built this example with the latest libraries recently? The Getting Started guide https://learn.sparkfun.com/tutorials/ge ... e-overview says to install the Sparkfun LIS2DH12 library but I'm wondering if the two libraries are not compatible.
 Topic permissions

You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

long long title how many chars? lets see 123 ok more? yes 60

We have created lots of YouTube videos just so you can achieve [...]

Another post test yes yes yes or no, maybe ni? :-/

The best flat phpBB theme around. Period. Fine craftmanship and [...]

Do you need a super MOD? Well here it is. chew on this

All you need is right here. Content tag, SEO, listing, Pizza and spaghetti [...]

Lasagna on me this time ok? I got plenty of cash

this should be fantastic. but what about links,images, bbcodes etc etc? [...]