免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
12
最近访问板块 发新帖
楼主: 皇家救星
打印 上一主题 下一主题

[C++] VS2005怎么编译unix程序? [复制链接]

论坛徽章:
0
11 [报告]
发表于 2009-12-08 22:57 |只看该作者
加上glibc的头文件在vs里面编译一个简单的hello world 一堆错误 看着头晕

e:\编程\glibc-2.4\glibc-2.4\include\sys\cdefs.h(7) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
e:\编程\glibc-2.4\glibc-2.4\include\sys\cdefs.h(7) : error C2440: “初始化”: 无法从“void (__cdecl *)(void)”转换为“int”
        没有使该转换得以执行的上下文
e:\编程\glibc-2.4\glibc-2.4\include\sys\cdefs.h(7) : error C2146: 语法错误 : 缺少“;”(在标识符“rtld_hidden_proto”的前面)
e:\编程\glibc-2.4\glibc-2.4\libio\stdio.h(30) : error C2448: “rtld_hidden_proto”: 函数样式初始值设定项类似函数定义
d:\program files\microsoft visual studio 8\vc\include\crtdefs.h(530) : error C2146: 语法错误 : 缺少“;”(在标识符“time_t”的前面)
d:\program files\microsoft visual studio 8\vc\include\crtdefs.h(1710) : error C2146: 语法错误 : 缺少“;”(在标识符“locinfo”的前面)
d:\program files\microsoft visual studio 8\vc\include\crtdefs.h(1710) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
d:\program files\microsoft visual studio 8\vc\include\crtdefs.h(1710) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
d:\program files\microsoft visual studio 8\vc\include\crtdefs.h(1711) : error C2146: 语法错误 : 缺少“;”(在标识符“mbcinfo”的前面)
d:\program files\microsoft visual studio 8\vc\include\crtdefs.h(1711) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
d:\program files\microsoft visual studio 8\vc\include\crtdefs.h(1711) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
d:\program files\microsoft visual studio 8\vc\include\crtdefs.h(1729) : error C2146: 语法错误 : 缺少“;”(在标识符“lc_id”的前面)
d:\program files\microsoft visual studio 8\vc\include\crtdefs.h(1729) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
d:\program files\microsoft visual studio 8\vc\include\crtdefs.h(1729) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
d:\program files\microsoft visual studio 8\vc\include\stddef.h(44) : error C2143: 语法错误 : 缺少“;”(在“__cdecl”的前面)
d:\program files\microsoft visual studio 8\vc\include\stddef.h(45) : error C2143: 语法错误 : 缺少“;”(在“__cdecl”的前面)
d:\program files\microsoft visual studio 8\vc\include\stddef.h(70) : error C2143: 语法错误 : 缺少“;”(在“__cdecl”的前面)
e:\编程\glibc-2.4\glibc-2.4\bits\types.h(6 : error C2146: 语法错误 : 缺少“;”(在标识符“__val”的前面)
e:\编程\glibc-2.4\glibc-2.4\bits\types.h(6 : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
e:\编程\glibc-2.4\glibc-2.4\bits\types.h(6 : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
e:\编程\glibc-2.4\glibc-2.4\bits\types.h(137) : error C2146: 语法错误 : 缺少“;”(在标识符“__dev_t”的前面)
e:\编程\glibc-2.4\glibc-2.4\bits\types.h(141) : error C2146: 语法错误 : 缺少“;”(在标识符“__ino64_t”的前面)
e:\编程\glibc-2.4\glibc-2.4\bits\types.h(145) : error C2146: 语法错误 : 缺少“;”(在标识符“__off64_t”的前面)
e:\编程\glibc-2.4\glibc-2.4\bits\types.h(150) : error C2146: 语法错误 : 缺少“;”(在标识符“__rlim64_t”的前面)
e:\编程\glibc-2.4\glibc-2.4\bits\types.h(173) : error C2146: 语法错误 : 缺少“;”(在标识符“__blkcnt64_t”的前面)
e:\编程\glibc-2.4\glibc-2.4\bits\types.h(177) : error C2146: 语法错误 : 缺少“;”(在标识符“__fsblkcnt64_t”的前面)
e:\编程\glibc-2.4\glibc-2.4\bits\types.h(181) : error C2146: 语法错误 : 缺少“;”(在标识符“__fsfilcnt64_t”的前面)
e:\编程\glibc-2.4\glibc-2.4\bits\types.h(187) : error C2146: 语法错误 : 缺少“;”(在标识符“__loff_t”的前面)
e:\编程\glibc-2.4\glibc-2.4\bits\types.h(18 : error C2143: 语法错误 : 缺少“;”(在“*”的前面)
e:\编程\glibc-2.4\glibc-2.4\wcsmbs\wchar.h(81) : error C2146: 语法错误 : 缺少“;”(在标识符“__wch”的前面)
e:\编程\glibc-2.4\glibc-2.4\wcsmbs\wchar.h(81) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
e:\编程\glibc-2.4\glibc-2.4\wcsmbs\wchar.h(81) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
e:\编程\glibc-2.4\glibc-2.4\wcsmbs\wchar.h(83) : error C4980: “__value”: 使用此关键字需要 /clrldSyntax 命令行选项
e:\编程\glibc-2.4\glibc-2.4\wcsmbs\wchar.h(83) : error C2059: 语法错误 : “__value”
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP