Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reference to 'SD' is ambiguous error #7

Closed
lana726 opened this issue Oct 11, 2016 · 4 comments
Closed

reference to 'SD' is ambiguous error #7

lana726 opened this issue Oct 11, 2016 · 4 comments

Comments

@lana726
Copy link

lana726 commented Oct 11, 2016

Hi,

I'm trying to run the Draw_SDCard_Bitmap example but I keep getting this error message.
screen shot 2016-10-12 at 1 51 37 am

@Bodmer
Copy link
Owner

Bodmer commented Oct 12, 2016

Thanks for reporting this. Only one SD library should be used ( SD or SdFat) and I see both are called up in the example, I have corrected this in the example on GitHub. Either use:

// SD Card library, comment out next line if the SdFat library is used
#include <SD.h>

// We can use the SdFat library instead and it will be a bit faster, uncomment next 2 lines
//#include <SdFat.h>           // Use the SdFat library for the Due
//SdFat SD;                    // Permit SD function call compatibility with no sketch changes :-)

Or:

// SD Card library, comment out next line if the SdFat library is used
//#include <SD.h>

// We can use the SdFat library instead and it will be a bit faster, uncomment next 2 lines
#include <SdFat.h>           // Use the SdFat library for the Due
SdFat SD;                    // Permit SD function call compatibility with no sketch changes :-)

Does that fix the error message?

@Bodmer
Copy link
Owner

Bodmer commented Oct 12, 2016

Sorry if you got multiple replies, had trouble getting the code markup syntax right!

@lana726
Copy link
Author

lana726 commented Oct 12, 2016

Hi thanks so much for that, I believe that has fixed the problem however I am now getting a new error message. Sorry I'm fairly new to this. "'File' was not declared in this scope"
screen shot 2016-10-12 at 9 14 29 pm

@Bodmer
Copy link
Owner

Bodmer commented Oct 14, 2016

The compiler is not finding an SD library. Make sure the following line is not commented out:

#include <SD.h>

Comment out the following 2 lines in the sketch thus:

//#include <SdFat.h>
//SdFat SD;  

@Bodmer Bodmer closed this as completed Oct 14, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants