1 Reply Latest reply on May 5, 2017 3:02 AM by Arda.FU

    Problem using time functions in CodeSourcery Lite


      I'm trying to use time() and localtime(), and I've included time.h so it compiles, but the linker complains:

      ~/CodeSourcery/bin/../lib/gcc/arm-none-eabi/4.3.3/../../../../arm-none-eabi/lib/libc.a(lib_a-gettimeofdayr.o): In function `_gettimeofday_r':

      gettimeofdayr.c:(.text+0x1c): undefined reference to `_gettimeofday'

      collect2: ld returned 1 exit status


      Do I have to do something to provide this function so I can use time() on a non-linux system?