today I have another issue, my toolchian can't figure out what is strptime. I've did some research on this. Some one said, it is not a standard C function, but a POSIX standard function. And my elcipse did successful found this function in <time.h>. But ESP-IDF still won't compile.
Any tipp for me?
Code: Select all
#include <stdio.h>
#include <time.h>
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
void app_main()
{
printf("Hello world!\n");
struct tm tm;
strptime("2017-11-11T11:11:11ZZ", "%y-%m-%dT%H:%M:%SZZ", &tm);
}
Code: Select all
/home/gfast2/esp/esp-idf/examples/get-started/hello_world/build/main/libmain.a(hello_world_main.o):(.literal.app_main+0xc): undefined reference to `strptime'
/home/gfast2/esp/esp-idf/examples/get-started/hello_world/build/main/libmain.a(hello_world_main.o): In function `app_main':
/home/gfast2/esp/esp-idf/examples/get-started/hello_world/main/./hello_world_main.c:11: undefined reference to `strptime'
collect2: error: ld returned 1 exit status
/home/gfast2/esp/esp-idf/make/project.mk:372: recipe for target '/home/gfast2/esp/esp-idf/examples/get-started/hello_world/build/hello-world.elf' failed
make: *** [/home/gfast2/esp/esp-idf/examples/get-started/hello_world/build/hello-world.elf] Error 1