"No such file or directory" when trying to import library Particle Workbench

I have looked at old threads and am stuck. I installed Particle Workbench today and keep getting the “no such file or directory” error with a library when trying to flash.

I used the built-in Workbench Install library feature to add the WebServer library, and it added the files / directory and also the line to my project.properties.

When I type in the path to the library in the include statement, it’s auto-completing and finding the path / files. I also tried installing an older version of Workbench, but no joy. I’ve also cleaned the project multiple times. I tried with a brand new project and imported a different library “InternetButton” and still the same error. I’ve also deleted the /examples/ folder in the lib.

project.properties:

name=webserver-http-2
dependencies.WebServer=0.0.2

Screenshot of my project:

Have you tried without the path?
Any installed library in the lib path will be considered automatically.

When you override that logic, you must make sure that the path is correct, but in your case it most likely is not.
Since you lead the path with lib/..., which would be relative to the position of your .ino file, which is stored in src which in turn is a “sibling” to lib.
Your include would be looking for a lib directory inside the src folder containing your .ino.
If you had to provide the path (which you don’t) it would be
#include "../lib/WebServer/src/WebServer.h".

Furthermore if you’d opt for a cloud compile you’d have no way of knowing where a library referenced as project.properties dependencies actually lives anyhow.

2 Likes

@ScruffR can’t believe it was that simple, thanks as always.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.