You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Pressing "Verify" fails. At link time there are multiple definitions of the File class found:
/tmp/build4707850354691374642.tmp/SD/SD.cpp.o: In function `callback_makeDirPath(SdFile&, char*, unsigned char, void*)':
/usr/local/share/arduino-1.5.6/libraries/SD/src/SD.cpp:257: multiple definition of `File::rewindDirectory()'
/tmp/build4707850354691374642.tmp/Bridge/FileIO.cpp.o:/usr/local/share/arduino-1.5.6/libraries/Bridge/src/FileIO.cpp:27: first defined here
/tmp/build4707850354691374642.tmp/SD/SD.cpp.o: In function `callback_makeDirPath(SdFile&, char*, unsigned char, void*)':
/usr/local/share/arduino-1.5.6/libraries/SD/src/SD.cpp:257: multiple definition of `File::openNextFile(unsigned char)'
(and so on in a similar fashion.)
Perhaps it's not a very important bug as most people will use the Yún's onboard SD card, but it's a special case for any library which includes SD (even if the sketch doesn't use the SD features.) Also it'd be nice to be able to have dual SD cards, one on a shield and one via the Yún!
The only API-compatible solution I can think of would involve File becoming an abstract base class, with SDFile and BridgeFile implementation. Though this is probably undesirable as it will add quite a few virtual method calls. I haven't looked into it more closely than that, sorry.
The text was updated successfully, but these errors were encountered:
This is the best workaround I can come up with for a library which uses SD library functions. This way it should support either an SPI-connected SD or a Bridged SD, depending on which library headers are included into the sketch.
Here's an example sketch that demonstrates the problem on 1.5.6r2:
Pressing "Verify" fails. At link time there are multiple definitions of the File class found:
Perhaps it's not a very important bug as most people will use the Yún's onboard SD card, but it's a special case for any library which includes SD (even if the sketch doesn't use the SD features.) Also it'd be nice to be able to have dual SD cards, one on a shield and one via the Yún!
The only API-compatible solution I can think of would involve File becoming an abstract base class, with SDFile and BridgeFile implementation. Though this is probably undesirable as it will add quite a few virtual method calls. I haven't looked into it more closely than that, sorry.
The text was updated successfully, but these errors were encountered: