warning: implicit declaration of function ‘sleep’(添加头文件: #include <unistd.h>)

Posted Dontla

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了warning: implicit declaration of function ‘sleep’(添加头文件: #include <unistd.h>)相关的知识,希望对你有一定的参考价值。

ubuntu编译c程序报错:

warning: implicit declaration of function ‘sleep’

解决方法:

添加头文件:
#include <unistd.h>

参考文章:implicit declaration of function ‘sleep’

以上是关于warning: implicit declaration of function ‘sleep’(添加头文件: #include <unistd.h>)的主要内容,如果未能解决你的问题,请参考以下文章

warning: implicit declaration of function ‘basename’ [-Wimplicit-function-declaration]

warning: incompatible implicit declaration of built-in function ‘exit’

warning: implicit declaration of function ‘sleep’(添加头文件: #include <unistd.h>)

Warning[Pe223]: function "XXXX" declared implicitly 解决方法

warning: incompatible implicit declaration of built-in function ‘memset’

warning: implicit declaration of function 'func1' [-Wimplicit-function-declaration]