Web IDE - Library not found

Let me start off by saying I’m very very new to this stuff. So far I have mostly been following the tutorials and documentations, however I’ve now run into an issue I can’t quite figure the solution for.

I’m working in the Web IDE, and whenever I use any applications that include libraries (e.g. even official ones like the Google Locator and Particle applications) when I try to compile it will always tell me it is unable to find those libraries: ‘‘No such file or directory’’. For example, I use one of the examples from the RelayShield application; without changing any code, it tells me it can’t find RelayShield.h although it’s clearly there.

Any help is greatly appreciated.

I’m using a Particle Electron v0.4.9.

Try updating your Electron to the latest system version (using the CLI). Selecting a version higher than 0.5.3 should fix the not-found issue.

1 Like

Thanks! I didn’t even realize it needed an update. I updated it to 0.6.2 and now it can load all libraries just fine :slight_smile:

1 Like

Actually, let me get back to that. For libraries where I simply use the associated example, things are fine now. However, I just tried to include a library to one of my existing projects, and it still has the same error.

in my project, it calls for: #include “ADXL362DMA.h” , which is part of the ADXL362DMA library.

If this existing project was created before the release of libraries v2.0 you may need to migrate that project in order to use v2.0 libraries.

There should be a dedicated MIGRATE LIBRARIES button in Web IDE to do that.

1 Like

I don’t see such a button on my screen. The library is only about 12 months old, and should work for my Electron according to the documentation.

What I want is firmware that will publish an event whenever the sensor is moved on specific axis, and this library seems to do just that. In case anyone wonders, here’s the documentation with files: https://github.com/rickkas7/AccelWake
I used accelwake_electron.cpp and the ADXL362DMA as the library, which isn’t detected.

can you post a snapshot of your project via the SHARE THIS REVISION button?

Here it is:

https://go.particle.io/shared_apps/594d421936792a58cc000b52

Error when I compile this is that it can’t find ADXL362DMA.h when I include it in Line 6

This compiles for me tho’
https://go.particle.io/shared_apps/594d5a8736792a935e000ddc

This was obviously wrong in your code

// This #include statement was automatically added by the Particle IDE.
#include <ADXL362DMA.h>             // it's already here, so the inlcude below is superfluous and even wrong

#include "Particle.h"               // this is superfluous, but if put in, it should be the first include

#include "ADXL362DMA/ADXL362DMA.h"  // <-- this is causing problems

Hi, could you pastebin it perhaps? I seem to have issues opening this shared app?

Ahh, sorry - since I deleted the app from my repo the link broke.
I’ll recreate it and update the post above.


Done! Try again.

Ah great, cheers! Seems to be compiling just fine now :slight_smile: Let me see how it works on my Electron now :smiley: