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
SdFat links correctly in the Arduino IDE. However, the use of certain functions in a sketch using SdFat results in linker errors as follows:
[100%] Linking CXX executable BGC_4G.elf
libmega_rawdata.a(rawdata.cpp.obj): In function `RAWDATA::store(EVENT, TrapStatus)':
/.../BGC_4G/lib/rawdata/rawdata.cpp:107: undefined reference to `FatFile::printField(int, char)'
collect2: error: ld returned 1 exit status
The recursive option is set for SdFat.
There is a header file SdFat/src/FatLib/FatFile.h which defines the prototypes for FatFile member functions including printField. However, the code for printField itself is in a file FatFilePrint.cpp. Moving it to the file FatFile.cpp eliminates the linker error but that seems like a dangerous workaround.
I am very new to CMake and I wonder if this is a bug or if anybody has a suggestion for what I could do to avoid this error?
The text was updated successfully, but these errors were encountered:
SdFat links correctly in the Arduino IDE. However, the use of certain functions in a sketch using SdFat results in linker errors as follows:
The recursive option is set for SdFat.
There is a header file SdFat/src/FatLib/FatFile.h which defines the prototypes for FatFile member functions including printField. However, the code for printField itself is in a file FatFilePrint.cpp. Moving it to the file FatFile.cpp eliminates the linker error but that seems like a dangerous workaround.
I am very new to CMake and I wonder if this is a bug or if anybody has a suggestion for what I could do to avoid this error?
The text was updated successfully, but these errors were encountered: