SdFatUtil: no such file !!??

Hi Arduiners!

I got in troubles with some software I need!

I got that 1.8.5 IDE version where SD library is natively installed. I look into that SD library and found under “utility” the SdFatUtil.h file.

So, why isn’t my code compiling?

#include <SdFatUtil.h>

void setup() {
  // put your setup code here, to run once:

}

void loop() {
  // put your main code here, to run repeatedly:

}

I get “SdFatUtil.h : no such foile or directory!”

When I tried to put the content of Utility in the main folder I got multiple errors…

Can somebody tell me what’s going wrong?!

Thanks!

why isn't my code compiling?

Probably because the file is not in a folder named SdFatUtil.h

What is it that you want to do with the SdFatUtil.h file ?

You need to do this:

#include <SD.h>  //adds the SD library folder to the #include search path
#include <utility/SdFatUtil.h>  //must specify the path relative to the SD library source folder

Of course, SD.h actually contains the line:

#include <utility/SdFatUtil.h>

so in this case it’s not necessary to add the second line to your sketch but it’s good to know how to do this as a general reference.

Another option is to specify the full path to SdFatUtil.h in the #include directive:

#include "path/to/SD/library/src/utility/SdFatUtil.h"

In that case it is not necessary to #include SD.h. The problem with that is it makes your code not portable since it is dependent on the specific folder structure on your computer, which might be different on another computer.

Hi!

Here’s what I’m trying to use as software:

It’s an eurorack module for playing sample and play around with it.

Ok i got it work so far pert. Maybe I will come along with some more errors!

Thank’s!

I believe in this case the SdFatUtil.h was originally part of the SdFat library the sketch requires:

 * needs SD Fat library too https://code.google.com/p/sdfatlib/

The Google Code link is a good indicator this is a very old sketch. As you probably found, that Library is now developed here:

Or the more recent work here:

But they do not contain a file SdFatUtil.h anymore. The file of that name in the Arduino SD library is in some way related to the SdFat project so hopefully things will work but I don't think it was the author of the sketche's original intent for that to be used, thus the difficulty you've encountered.