您的位置:首页 > 运维架构 > Linux

编译linux程序,unistd.h vc的处理

2013-07-13 09:55 141 查看
许多在Linux下开发的C程序都需要头文件unistd.h,但VC中没有个头文件,

所以用VC编译总是报错。把下面的内容保存为unistd.h,可以解决这个问题。

类似还有

#include <sys/time.h>等linux写法,

在vc中可直接#include <sys/time.h>

/** This file is part of the Mingw32 package.

* unistd.h maps (roughly) to io.h

*/

#ifndef _UNISTD_H

#define _UNISTD_H

#include <io.h>

#include <process.h>

#endif /* _UNISTD_H */
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: