Page 1 of 1

time functions

Posted: Tue Jan 06, 2009 10:41 am
by navydev
I am trying to use some of the time functions of time.h and
nbtime.h, specifically

time_t timeNow;
timeNow = time( &timeNow );
I get a linker error for the function time.

and the other linker error get is on the function set_time;

time_t setTime = ( ( sysTime.tm_hour * 3600 ) +
( sysTime.tm_min * 60 ) +
( sysTime.tm_sec ) );

set_time( setTime );

This also gives me a linker error on the function set_time.

I have included the header files. And I know you aren't supposed to
include nbtime.h if you are using time.h and vice versa but when I excluded
either of them I still get the linker errors.

Is there a library I am supposed to be linking in?