Utils.h: No such file or directory

Hi,

I've tried adding this library from three different Github repos and haven't had any luck with compiling. Below is include.

#include "Utils.h"

I've used the "add zip file" method of adding this library but still getting the ole "No such file or directory" error. Any suggestions?

Please post a link to where you downloaded the library from.

Here is one of them:

OK. Which version of the Arduino IDE are you using?

1.8.13
Thanks!

Do this:

  • Download the .zip file of the repository: https://github.com/PedroLopes/arduino-utils/archive/master.zip
  • Unzip the downloaded file.
  • (In the Arduino IDE) Sketch > Include Library > Add .ZIP Library...
  • Select the "libraries" subfolder of the unzipped folder.
  • Click the "Open" button.
  • Wait for the message to appear on the Arduino IDE's status bar that the library was successfully installed.

In order to be installed via the IDE's "Add .ZIP Library...", the .zip file must have the library directly under the root folder. Unfortunately, this particular repository is not structured that way. Fortunately, the Add .ZIP Library... feature can also install libraries from folders (though that capability was lost in Arduino IDE 2.x, thus my question about which version you're using), so you are able to use it to install the subfolder that does contain the library.


I will warn you that with a generic file name like "Utils.h", you are very unlikely to find the library your sketch was written for by doing a basic "arduino Utils.h" type of search. If you did that, there's a good chance you'll just get another error when you compile the sketch after installing this library. The best case scenario would be that the author of the sketch you found documented the library dependencies. If not, you may still be able to get some context from the documentation and code that can help you identify the library. Note also that, even though they often consist of a single .ino file, Arduino sketches can consist of multiple files, including .h files. So this "Utils.h" may actually be part of the sketch, but you missed it.

That said, it's still valuable to learn about how to install libraries, even if that knowledge doesn't actually help you in this particular situation.

So I install 13 other libraries for this particular project without an issue. I got this work though by going to sketch book location > Libraries and then added a folder named Utils and then added the header and source file in that folder and boomed it worked.

Thanks for your time!

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