error: conflicting declaration of 'int closedir(DIR*)
Posted: Thu Jul 08, 2021 6:50 am
Hi, after a eclipse software update the following lines of code:
main.cpp
causes the error
I have removed completely esp-idf and eclipse right now but the problem persists.
In the past I used the same functions without any problem.
Have you got a suggestion form me?
main.cpp
Code: Select all
#include <stdio.h>
#include <sys/types.h>
#include <dirent.h>
extern "C" {
void app_main(void);
}
void app_main(void)
{
printf("Hello world!\n");
DIR *Directory;
opendir("");
readdir(Directory);
closedir(Directory);
}
Code: Select all
error: conflicting declaration of 'int closedir(DIR*)' with 'C' linkage int closedir(DIR *);
In the past I used the same functions without any problem.
Have you got a suggestion form me?