jschell

Problem using time functions in CodeSourcery Lite

Discussion created by jschell on Jul 3, 2014
Latest reply on May 5, 2017 by Arda.FU

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?

Outcomes