time functions

Discussion to talk about software related topics only.
Post Reply
navydev
Posts: 7
Joined: Thu Dec 04, 2008 6:13 am

time functions

Post 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?
Real Programmers comment code. If you can't explain it, you probably guessed.
Post Reply