Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
7 years, 8 months ago.
I got an error when I'm using printf()
Hello, I faced a problem about using printf. I use LPC1768 mbed original board. I create new project on online compiler and I make a program using printf(). Therefore, I get the following error.
Warning: Function "mbed::FileSystemLike::FileSystemLike(const char *)" (declared at <a href="#" onmousedown="mbed_doc_goto('/DHT11_testextras/mbed_093f2bd7b9eb/drivers/FileSystemLike.h', '47'); return false;">/extras/mbed_093f2bd7b9eb/drivers/FileSystemLike.h:47</a>) was declared "deprecated" in "extras/mbed_093f2bd7b9eb/drivers/LocalFileSystem.h", Line: 99, Col: 53
I compile before created project and I did not get it. I cannot understand what it means and how to resolve it.
I need your help. I'm looking forward to your answer.
3 Answers
7 years, 7 months ago.
It's a warning not an error. It doesn't stop the project from compiling.
The warning is telling you that one of the libraries you are using is using a system call that may not be supported in the future.
It's perfectly safe to ignore it.
7 years, 8 months ago.
Can you post your full code? It sounds like a typo
Thank you very much for your reply. I copy and paste my code in the following. I think it is not a typo. This code run correctly on older mbed library.
- include "mbed.h"
DigitalOut myled(LED1);
int main() { while(1) { myled = 1; wait(0.2); myled = 0; wait(0.2); printf("Hello"); } }
posted by 28 Mar 20177 years, 7 months ago.
Kashihara-san,
If you have a problem in the LocalFileSystem itself (not printf), we are already aware that latest mbed library (rev 138) has an issue here: https://github.com/ARMmbed/mbed-os/issues/3983
Possible workaround is to use previous version 137.
I hope this helps.