编译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 */
所以用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 */
相关文章推荐
- 编译linux程序,unistd.h vc的处理
- linux下编译程序使其处理超过2G的大文件
- linux下处理大文件程序的编译参数
- 使用VC+VA编写/编译/运行/调试linux程序
- VC编译程序时Cannot open precompiled header file: 'Debug/.pch': No such file or directory错误处理
- Linux下编译《UNIX环境高级编程》的第一个程序时出错的处理方法
- linux下运行《UNIX环境高级编程》的第一个程序时源码编译出错的处理方法
- Linux下编译和部署JavaWeb程序脚本
- DOS下编译VC程序
- linux多核处理下提高编译速度 make -j
- linux下用gcc编译使用了math库函数的程序出错的解决方法
- linux程序编译
- [转帖]VC++下编译出极小的程序
- 在Linux下如何使用GCC编译程序、简单生成静态库及动态库
- linux 下,编译c程序
- 让C/C++程序一次编译,到处运行 (仅限Linux)
- Linux上编译opencv程序
- 编译第一个Linux程序遇到的问题- ‘cout’ was not declared in this scope
- 让vc编译出的程序减小体积
- Linux下编译C/C++时,出现/usr/bin/ld: cannot find -l*** 错误的处理