Esp-idf: implicit declaration of function 'unlink'

Created on 12 Jan 2017  路  2Comments  路  Source: espressif/esp-idf

Hello im trying to use vfs with spiffs. I can open and write files but when I add unlink to my code I get the following error:

error: implicit declaration of function 'unlink' [-Werror=implicit-function-declaration]
unlink("/data/foo.txt");
^

other functions like fopen, fclose, stat and rename work.

Most helpful comment

Maybe #include <sys/unistd.h>

All 2 comments

Maybe #include <sys/unistd.h>

Thanks, that did it.

Was this page helpful?
0 / 5 - 0 ratings