Missing functions from time.h

I'm getting error:

error: implicit declaration of function 'localtime'

When trying to use any of the time related functions: localtime,strftime etc. I have the

"#include <time.h>" in the file, but armgcc is acting like the functions were unavailable.

I suspect I'm missing something obvious in the sdk_config or Makefile, can you give me a hint?

  • Problem solved. It was my mistake, but I will leave it there for other people. At the beginning I named my file time.c/time.h but I quickly realized it might conflict with the generic time.h and changed the name. However, in the heather file I left the old name in the heather guard:

    #ifndef _TIMECLOCK_H_
    #define _TIMECLOCK_H_
    #include <stdint.h>
    #include <stdbool.h>
    #include <time.h>
    ...

    And that was causing the "real" time.h to be omitted.

Related