greiman / SdFat

Arduino FAT16/FAT32 exFAT Library
MIT License
1.08k stars 509 forks source link

'SysCall' has not been declared #367

Closed landret closed 2 years ago

landret commented 2 years ago

Hi, I am using the latest version of the Arduino IDE v1 and I recently installed and tested the library v2.1.2. However I met the following compile error with example QuickStart.ino for an Arduino Uno board:

C:\Users\christophe\Documents\Arduino\libraries\arduino_279335\examples\QuickStart\QuickStart.ino:` In function 'void setup()': QuickStart:71:5: error: 'SysCall' has not been declared SysCall::yield(); ^~~ C:\Users\christophe\Documents\Arduino\libraries\arduino_279335\examples\QuickStart\QuickStart.ino: In function 'void loop()': QuickStart:109:5: error: 'SysCall' has not been declared SysCall::yield(); ^~~ QuickStart:185:5: error: 'SysCall' has not been declared SysCall::yield(); ^~~ Multiple libraries were found for "SdFat.h" Used: C:\Users\christophe\Documents\Arduino\libraries\SdFat Not used: C:\Users\christophe\Documents\Arduino\libraries\arduino_619442 Not used: C:\Users\christophe\Documents\Arduino\libraries\arduino_279335 Not used: C:\Users\christophe\Documents\Arduino\libraries\arduino_365116 Using library SPI at version 1.0 in folder: C:\Users\christophe\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.5\libraries\SPI Using library SdFat at version 2.1.2 in folder: C:\Users\christophe\Documents\Arduino\libraries\SdFat exit status 1 'SysCall' has not been declared

This is solved by removing every occurence of SysCall:: from this example.

greiman commented 2 years ago

Are you using the latest version of QuickStart?

It no longer has SysCall:yield() at line 71, 109, 185.

landret commented 2 years ago

It looks like no. I used the Arduino library manager to update the library. The library version is now 2.1.2 but it looks like the Quickstart example was not updated. The same for the Bench example which also contains Syscall.

greiman commented 2 years ago

I have seen glitches in the library manager in the past. The mod to remove SysCall done on October 31, 2021 in 2.1.1 and you are the first to report a problem. Many other examples were changed.

Looks like you may have multiple copies of SdFat.

Multiple libraries were found for "SdFat.h" Used: C:\Users\christophe\Documents\Arduino\libraries\SdFat Not used: C:\Users\christophe\Documents\Arduino\libraries\arduino_619442 Not used: C:\Users\christophe\Documents\Arduino\libraries\arduino_279335 Not used: C:\Users\christophe\Documents\Arduino\libraries\arduino_365116

landret commented 2 years ago

Indeed, there was 3 copies but I can't remember how they got here. Removing them solved the problem. Thanks and sorry about that.