本文专自http://blog.csdn.net/mangobar/article/details/6314700

 

unistd.h是unix standard header之意,因此,Linux下开发的C程序都需要头文件unistd.h,但VC中没有个头文件,所以用VC编译总是报错。把下面的内容保存为unistd.h,可以解决这个问题(如果不行,把unistd.h文件保存到默认的库目录中,我的电脑VS2008是C:\Program Files\Microsoft Visual Studio 9.0\VC\include)。


/** 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 */

相关文章:

  • 2022-02-22
  • 2022-01-01
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-08-25
  • 2021-08-25
  • 2022-12-23
  • 2022-12-23
  • 2021-11-12
  • 2021-08-08
  • 2022-12-23
相关资源
相似解决方案