invalid use of undefined type & storage size unknown
问题 I am trying to move some functions to separate file in c project. I made util.h file with #ifndef _UTIL_H #define _UTIL_H #include <signal.h> #include <termios.h> #include <time.h> ... extern struct timeval tv1, tv2, dtv; void time_start(); long time_stop(); and I made util.c file with #include "util.h" ... struct timeval tv1, tv2, dtv; void time_start() { gettimeofday(&tv1, &timezone); } long time_stop() { gettimeofday(&tv2, &timezone); dtv.tv_sec = tv2.tv_sec - tv1.tv_sec; ... in cmake I