重定位被截断以适应:R_X86_64_PC32 针对 `.bss'
编译时我在 g++ 中收到此链接器错误:
其余的代码并不重要,因为这个定义破坏了我的编译。时间函数在 sys/time.h 中。在 64 位 RHEL 上编译。
long ntime() {
struct timeval tp;
gettimeofday(&tp, (struct timezone *)0);
return (tp.tv_sec*1000 + tp.tv_usec / 1000);
}
告诉我为什么这是错误的?
提前致谢。