可以在CMakeFileList找到类似下面语句 SET(CMAKE_xxxxxxxxx_DEBUG xxxxxxx -O0 -xxxxx -std=xxxx -lrt") 添加-lrt即可。 相关文章: