Pages: [1]   Go Down
Author Topic: Official SdFat example with compile errors ?  (Read 1914 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi there,
today I tried to migrate from arduino-0023 to arduino-1.0.3, wondering about some compile errors that did (and do) not occur before. Surprise: Even the official example accompanying arduino-1.0.3 yields the following compile errors:

-------
In file included from SdFatLs.pde:7:
C:\Dokumente und Einstellungen\Joe Turner\Desktop\arduino-1.0.3\libraries\SdFat/SdFat.h:286: error: conflicting return type specified for 'virtual void SdFile::write(uint8_t)'
C:\Dokumente und Einstellungen\Joe Turner\Desktop\arduino-1.0.3\hardware\arduino\cores\arduino/Print.h:48: error:   overriding 'virtual size_t Print::write(uint8_t)'
In file included from SdFatLs.pde:8:
C:\Dokumente und Einstellungen\Joe Turner\Desktop\arduino-1.0.3\libraries\SdFat/SdFatUtil.h: In function 'void SerialPrint_P(const prog_char*)':
C:\Dokumente und Einstellungen\Joe Turner\Desktop\arduino-1.0.3\libraries\SdFat/SdFatUtil.h:58: error: 'Serial' was not declared in this scope
C:\Dokumente und Einstellungen\Joe Turner\Desktop\arduino-1.0.3\libraries\SdFat/SdFatUtil.h: In function 'void SerialPrintln_P(const prog_char*)':
C:\Dokumente und Einstellungen\Joe Turner\Desktop\arduino-1.0.3\libraries\SdFat/SdFatUtil.h:68: error: 'Serial' was not declared in this scope

-------

What can I do?

Thanks,
HP

Logged

0
Offline Offline
Edison Member
*
Karma: 64
Posts: 1634
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Have you updated SdFat?  Also make sure there are no old versions of SdFat in any of your libraries folders.

Arduino 1.0 and newer is incompatible with many older libraries.  The Arduino company changed many types in the Print class.

You clearly are compiling an old version of SdFat.  You get an error at line 286 of SdFat.h but recent versions of SdFat.h don't have that many lines.

Also the type for sketches is now .ino but the example you are compiling still has the old .pde type.

SdFat is here http://code.google.com/p/sdfatlib/downloads/list.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for your patience.
I didn't remenber that the lower half of examples listed in the IDE menue does not come from the "examples" subdirectory but from within the libraries themselves. I followed your advice, installed the new library and ... everything is just fine.
Thanks again.
HP
Logged

Pages: [1]   Go Up
Jump to: