Linux C 编译错误总结

1. test.c:59:5: warning: incompatible implicit declaration of built-in function ‘memset’ [enabled by default]

添加头文件: #include<string.h>, 解决。

2.implicit declaration of function ‘sleep’ [-Wimplicit-function-declaration

Because sleep isn't in time.h? It's in unistd.h, on *nix machines. 所以添加"#include <unistd.h>"解决

posted @ 2014-10-31 11:14  Magnum Programm Life  阅读(246)  评论(0编辑  收藏  举报