-1

is there any way to rename a file in sd card without using SdFat? Thank you im getting error when inclung the

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

the error msg was "Error compiling for board Arduino/Genuino Uno. "

Local\Temp\ccZn9IeW.ltrans2.ltrans.o: In function FatVolume::init(unsigned char) [clone .constprop.18]': \Arduino\libraries\SdFat\src/FatLib/FatVolume.cpp:439: undefined reference to SD' \Arduino\libraries\SdFat\src/FatLib/FatVolume.cpp:440: undefined reference to `SD'

closed as unclear what you're asking by gre_gor, sempaiscuba, per1234, VE7JRO, Gerben Sep 21 '18 at 14:00

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • Looks like you did not add this library the correct way. Please give more information: your IDE, your board, your settings and folder structure of your SdFat library. – Faig Sep 17 '18 at 14:15
  • The standard arduino sd library can not rename a file. The sdfat library can rename a file. If you want to rename a file, then you have to use the sdfat library. – Jot Sep 17 '18 at 14:17
1

Remove the extern keyword from SdFat SD; because it tels the compiler that the variable is defined elsewhere and it is not and the linker then can't find it.

Not the answer you're looking for? Browse other questions tagged or ask your own question.