Linux编译错误:undefined reference to 'clock_gettime' and 'clock_settime' 解决办法: 增加 -lrt,不过要注意位置:必须放在源码后面。 放到依赖库列表中。 相关文章: