#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?
[Linker error] undefined reference to 'set_time'
[Linker error] undefined reference to 'set_time'
Real Programmers comment code. If you can't explain it, you probably guessed.
Re: [Linker error] undefined reference to 'set_time'
Have you tried rebuilding the system files?