Go Down

Topic: Trouble installing SdFat Library ... (Read 6132 times) previous topic - next topic


I'm having trouble installing the SdFat library on Arduino 1.6.7.  I've downloaded the latest version of SdFat from github and attemped to install from Sketch/Include Library/Add .ZIP Library... and also doing a manual install per the arduino instructions. Both of these methods don't seem to work and I get the following message: Invalid library found in C:\Program Files (x86)\Arduino\libraries\SdFat: C:\Program Files (x86)\Arduino\libraries\SdFat.  Not sure how to proceed. Appreciate any guidance.


I'm assuming you mean this library: https://github.com/greiman/SdFat. The problem is probably the folder structure of that download. Try following these instructions:
  • Delete C:\Program Files (x86)\Arduino\libraries\SdFat
  • Download the library: https://github.com/greiman/SdFat/archive/master.zip
  • Determine your sketchbook folder location: File > Preferences > Sketchbook location:
  • Open the downloaded SdFat-master.zip
  • Copy the folder SdFat-master\SdFat to {your sketchbook location}\libraries
  • Restart the Arduino IDE if open.


Dear fellow Arduinoers,

I'm trying to install the SdFat library but I'm having problems when I try running one of the example sketches from the library. For instance, after following step-by-step (literally) the instructions posted by pert (see above), I try running the example sketch "SdInfo".

However, when I try to "verify" the code (before uploading to my uno), line 21 gets highlighted ("SdFat sd;") and I get the error "'SdFat' does not name a type". Other errors that are also shown are:

SdInfo.ino:5:19: error: SdFat.h: No such file or directory
SdInfo:21: error: 'SdFat' does not name a type
SdInfo:24: error: 'ArduinoOutStream' does not name a type
etc etc...

I have a feeling that the proper library files are not being found. After installing in my computer (mac), the SdFat library is located in:
 {sketchbook location}/libraries/SdFat

Inside this directory I have:
- examples (directory)
- library.properties (file)
- MainPage (directory, which contains the file "SdFatmainpage.h")
- src (directory, which contains many directories and .h files, including SdFat.h)

I tried copying the files in the "src" file into the "SdFat" directory but I still get errors.

Any suggestions on what may be going on? I'm using Arduino 1.0.5

Thank you in advance!!! =)


Nov 10, 2016, 07:55 am Last Edit: Nov 10, 2016, 07:56 am by Ballscrewbob
LOL just had same issue...

There are multiple folders inside the master.

You just need the one folder that has the libs for it to work.
Otherwise you will get the errors you are seeing.
The folder is just called "SdFat"

You could also try breaking out the SdFat_master from the Sdfat_master folder as they are for some reason duplicated.

I wanted a set of backup data for thingspeak and I have had these SD units sat doing nothing...Working well so far

I moved the remaining SdFat_master folders out of the lib folder as a double check
It may not be the answer you were looking for but its the one I am giving based on either experience, educated guess, google or the fact that you gave nothing to go with in the first place so I used my wonky crystal ball.


I'm using Arduino 1.0.5
2013 called, they want their IDE back. You're using a 3.5 year old IDE. You do realize there have been 23 releases since that IDE version right? Get with the times. I don't have any clue why that sketch doesn't work in 1.0.5 but it compiles fine with 1.6.12 and I'm sure other recent versions too. Most developers don't test their code for backwards compatibility that far back.


Thanks guys for all the responses! I updated the software and reinstalled the library, and it all works like a charm now =)

Go Up