Page 1 of 1

Issue with FS Library: undefined reference to `vtable for fs::FileImpl'

Posted: Fri Aug 18, 2023 4:43 am
by brindha__kumar
Hi
I created My Arduino Project as component in ESP-IDF version 5.1. It was worked. But I just added the FS library in my ESP IDF project.
This is the library link: https://github.com/espressif/arduino-es ... braries/FS
It was showing error like esp-idf/arduino/libarduino.a(vfs_api.cpp.obj):(.literal._ZN11VFSFileImplD2Ev+0x4): undefined reference to `vtable for fs::FileImpl'
But in arduino IDE It was not showing any error. I accessed File with FS library. I need support for using FS library in ESP IDF 5.1.
Please help me to resolve this issue.

Regards
Brindha K

Re: Issue with FS Library: undefined reference to `vtable for fs::FileImpl'

Posted: Fri Aug 18, 2023 8:42 am
by MicroController
How did you "add the library" to your IDF project?
You'll probably not be able to include a precompiled Arduino library (*.a) into a non-Arduino build.
You should include the library's source into the build so that it is built by the same compiler (version) as the rest of the project.
However, since the FS library seems to have dependencies to other Arduino stuff, it's probably not going to build with "pure" IDF.

TL,DR: Arduino libraries won't work in (non-Arduino) IDF project.

Re: Issue with FS Library: undefined reference to `vtable for fs::FileImpl'

Posted: Fri Aug 18, 2023 12:21 pm
by brindha__kumar
Hi Thanks for your response!!
I added the FS library using "Arduino as component" method.
The same way I added Arduino libraries like WiFi, SPI and EEPROM library. It works for me. While adding FS only I got error.
Is there any possibilities to add Arduino FS dependencies with IDF?
I didn't find any references or examples in FS libraries.
Please help me to resolve this issue.

Regards
Brindha K