这种问题是 1.不同系统; 2.函数大小写不同 导致的。 在windows下: 添加: #include <Windows.h> 并修改sleep为Sleep。 在ubuntu下(未验证): sleep 为小写