hi,i try to compile a C program usig gcc but get this error:
timerc.c: In function ‘timer_’:
timerc.c:32:16: error: storage size of ‘Time_Struct’ isn’t known
here is the program:
#include <sys/types.h>
#if TIME_WITH_SYS_TIME
# include <sys/time.h>
# include <time.h>
#else
# if HAVE_SYS_TIME_H
# include <sys/time.h>
# else
# include <time.h>
# endif
#endif
void timer_(long *UnixSysTime)
{
int dummy;
struct timeb Time_Struct;
dummy=ftime(&Time_Struct);
*UnixSysTime=Time_Struct.time;
}
Add
after the other includes lines.
Then the compiler WILL KNOW his storage size