Unable to compile AssetTracker library when copied to current project in Desktop IDE (Dev)

I created a new project in Dev and then added the AssetTracker library by selecting “Use->Copy to current project”. Without adding/changing any code I compiled and got the following error:

…/AssetTracker.h: No such file or directory
src/AssetTracker.h:1:29

I have tried the following:

  1. Adding the AssetTracker library to the project via the Use->Add to current project option in the Desktop IDE (Dev), which adds the line “dependencies.AssetTracker=0.0.10” to the project.properties file. I get the same error.

  2. Moving the lib folder that was added to the src folder. In the online documentation it says that selecting “Use->Copy to current project” will place the lib folder in the src directory, but it put it at the same level as the src directory. After moving it under the src directory I got the same error.

Any help would be appreciated! Thanks!

Jason

This is a known issue when copying a library to your project.
You need to remove the AssetTracker folder inside the src folder and you need to remove the examples folder from the library too.
The lib folder should actually be along side the main src folder and the project.properties file.

And the include statement in your project should be #include <AssetTracker.h> without the ../

3 Likes

Thank you for responding, ScruffR! I tried what you said and it worked once I also removed the example files from all the Adafruit libraries that were also copied to the project along with the AssetTracker library. I’ve included screenshots of the original project directory structure and the modified version that worked.

Thanks again!
Jason

Original Directory Structure

Modified Directory Structure that Compiled:

1 Like