[Linker error] undefined reference to 'set_time'

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

[Linker error] undefined reference to 'set_time'

Post by navydev »

#include<nbtime.h>

tm sysTime;
time_t time_to_set;

cout << "Enter the hour: " ;
cin >> sysTime.tm_hour;
cout << "Enter the minutes: " ;
cin >> sysTime.tm_min;

sysTime.tm_sec = 0;
sysTime.tm_mday = 8;
sysTime.tm_mon = 1;
sysTime.tm_year = 109;

time_to_set = mktime( &sysTime );
set_time( time_to_set );

timeNow = time( &timeNow );

cout << "Time set as " << ctime( &timeNow );



Does anyone else get this linker error?
And/or does anyone know how to correct it?
Real Programmers comment code. If you can't explain it, you probably guessed.
stevep
Posts: 16
Joined: Fri Apr 25, 2008 6:34 am

Re: [Linker error] undefined reference to 'set_time'

Post by stevep »

Have you tried rebuilding the system files?
Post Reply