Pages: [1]   Go Down
Author Topic: Library not found even though it's there with Sparkfun mp3 shield  (Read 1336 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 9
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi All --

I'm a bit stumped here.  I got one of these http://www.sparkfun.com/products/10628 MP3 Player Shield from sparkfun. Reading the comments in the example code and the forum there, I download the sdfatlibs that are needed to talk to the sd card.

They are installed in /libraries/sdfatlib, I've restarted the IDE, but when I compile I get the error below.  That error says it cant find SdFat.h and SdFatUtil.h but these are both in the sdfatlib directory.

Even if I copy these two files into the same directory as the sketch I get the same error.

No matter how I try I cant get pst this error.

Any thoughts?
Thanks!

My error ->



MP3_Player_Example.cpp:52:19: error: SdFat.h: No such file or directory
MP3_Player_Example.cpp:53:24: error: SdFatUtil.h: No such file or directory
MP3_Player_Example:55: error: 'Sd2Card' does not name a type
MP3_Player_Example:56: error: 'SdVolume' does not name a type
MP3_Player_Example:57: error: 'SdFile' does not name a type
MP3_Player_Example:58: error: 'SdFile' does not name a type
MP3_Player_Example.cpp: In function 'void setup()':
MP3_Player_Example:113: error: 'card' was not declared in this scope
MP3_Player_Example:113: error: 'SPI_FULL_SPEED' was not declared in this scope
MP3_Player_Example:114: error: 'volume' was not declared in this scope
MP3_Player_Example:114: error: 'card' was not declared in this scope
MP3_Player_Example:115: error: 'root' was not declared in this scope
MP3_Player_Example:115: error: 'volume' was not declared in this scope
MP3_Player_Example.cpp: In function 'void playMP3(char*)':
MP3_Player_Example:187: error: 'track' was not declared in this scope
MP3_Player_Example:187: error: 'root' was not declared in this scope
MP3_Player_Example:187: error: 'O_READ' was not declared in this scope
MP3_Player_Example:210: error: 'track' was not declared in this scope
MP3_Player_Example:243: error: 'track' was not declared in this scope
MP3_Player_Example:264: error: 'track' was not declared in this scope
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 509
Posts: 31462
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
That error says it cant find SdFat.h and SdFatUtil.h but these are both in the sdfatlib directory.

They should both be in a SdFat directory not a sdfatlib directory.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 9
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for the reply. I renamed the directory, restarted the IDE and got the same exact error.

What's you second best idea?

Thanks!
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 509
Posts: 31462
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Second best idea is to rename the directory sdfatlib, then drag out the folder SdFat from it an include it in the top level of libraries.

The problem is that it appears this library in within a library and the #include file is not finding it. There should be a way to put the path name in the #include statement but I haven't found a way that works on my machine to do this yet (mac) so putting the SdFat folder at the libraries level is a bit of a fudge but works for me.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 9
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks Mike,

I'll remember that trick.  It's compiling now.  Off to find the next problem.

Much Thanks
Logged

Pages: [1]   Go Up
Jump to: