| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 631 人关注过本帖
标题:请教头文件unistd.h的问题
只看楼主 加入收藏
lvhonglx
Rank: 1
等 级:新手上路
帖 子:4
专家分:0
注 册:2006-12-6
收藏
 问题点数:0 回复次数:1 
请教头文件unistd.h的问题
我在VC中编译一个C++程序,但是说找不到unistd.h。于是在网上查到说,

许多在Linux下开发的C程序都需要头文件unistd.h,但VC中没有个头文件, 所以用VC编译总是报错。把下面的内容保存为unistd.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 */


我按这种方法作了,但编译后出现更多错误,如下:
c:\program files\microsoft visual studio\vc98\include\gl\gl.h(1152) : error C2054: expected '(' to follow 'WINGDIAPI'
c:\program files\microsoft visual studio\vc98\include\gl\gl.h(1152) : error C2085: 'APIENTRY' : not in formal parameter list
c:\program files\microsoft visual studio\vc98\include\gl\gl.h(1152) : error C2146: syntax error : missing ',' before identifier 'glAccum'
c:\program files\microsoft visual studio\vc98\include\gl\gl.h(1152) : error C2143: syntax error : missing ';' before '('
c:\program files\microsoft visual studio\vc98\include\gl\gl.h(1152) : error C2059: syntax error : ')'

由于错误太多,所以只复制了部分

请教高手:这是怎么回事?该怎么解决这个问题呢?谢谢

搜索更多相关主题的帖子: 教头 unistd 文件 
2007-10-25 22:16
nhjnhjj
Rank: 1
等 级:新手上路
帖 子:11
专家分:0
注 册:2007-10-25
收藏
得分:0 

2007-10-30 16:53
快速回复:请教头文件unistd.h的问题
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.021290 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved