日期:2014-05-16  浏览次数:20606 次

有没有命令可以查找某个函数所需包含的头文件?
如题,如果用find + grep 有点麻烦?

------解决方案--------------------
man 函数名
------解决方案--------------------
我这里man open的结果
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>

int open(const char *pathname, int flags);
int open(const char *pathname, int flags, mode_t mode);
int creat(const char *pathname, mode_t mode);

不知道你是不是用的Ubuntu 默认好像没有安装c语言等的man手册

------解决方案--------------------
用 man最好
------解决方案--------------------
有可能是你没有安装 man, 比如 ubuntu上面默认是没有装的,
探讨
引用:

man 函数名


比如man open ,并没有看到。