免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1151 | 回复: 3
打印 上一主题 下一主题

red hat 9 下 C 图形程序编译问题. [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2005-11-03 01:34 |只看该作者 |倒序浏览
#include "graphics.h"
int main()
{
     int gdriver, gmode;
     gdriver=VGA;
     gmode=VGAHI;
     initgraph(&gdriver, &gmode, "c:\\tc");
     bar3d(100, 100, 300, 250, 50, 1);       /*画一长方体*/
     getch();
     closegraph();
     return 0;
}
在WIN XP下用TC2.0编译成功.为什么在RED HAT 9 下编译时提示找不到graphics.h.将该文件CP到源程序目录下后出现错误提示:

In file included from graphic.c:1:
graphics.h:241: parse error before "arc"
graphics.h:242: warning: data definition has no type or storage class
graphics.h:243: parse error before "bar"
graphics.h:243: warning: data definition has no type or storage class
graphics.h:244: parse error before "bar3d"
graphics.h:245: warning: data definition has no type or storage class
graphics.h:246: parse error before "circle"
graphics.h:246: warning: data definition has no type or storage class
graphics.h:247: parse error before "cleardevice"
graphics.h:247: warning: data definition has no type or storage class
graphics.h:248: parse error before "clearviewport"
graphics.h:248: warning: data definition has no type or storage class
graphics.h:249: parse error before "closegraph"
graphics.h:249: warning: data definition has no type or storage class
graphics.h:285: warning: data definition has no type or storage class
graphics.h:286: parse error before '*' token
graphics.h:286: warning: data definition has no type or storage class
graphics.h:372: warning: data definition has no type or storage class
graphics.h:373: parse error before "gothic_font_far"
graphics.h:373: warning: data definition has no type or storage class
graphics.h:377: stray '\32' in program
In file included from graphic.c:1:
graphics.h:377:2: warning: no newline at end of file
graphics.h:349: warning: array `CGA_driver_far' assumed to have one element
graphics.h:350: warning: array `EGAVGA_driver_far' assumed to have one element
graphics.h:351: warning: array `IBM8514_driver_far' assumed to have one element
graphics.h:352: warning: array `Herc_driver_far' assumed to have one element
graphics.h:353: warning: array `ATT_driver_far' assumed to have one element
graphics.h:354: warning: array `PC3270_driver_far' assumed to have one element
graphics.h:370: warning: array `triplex_font_far' assumed to have one element
graphics.h:371: warning: array `small_font_far' assumed to have one element
graphics.h:372: warning: array `sansserif_font_far' assumed to have one element
graphics.h:373: warning: array `gothic_font_far' assumed to have one element

(bbs限止删了很多行错误提示.)
好多warning好恐怖.这些警告信息我看不懂.请指教.谢谢!

论坛徽章:
0
2 [报告]
发表于 2005-11-03 08:23 |只看该作者
这是 tc 2 自己的图形库阿。
你怎么把它用在 linux 下呢?

论坛徽章:
0
3 [报告]
发表于 2005-11-03 08:46 |只看该作者
那是Borland自己开发的图形库,要不然TC以前也不会那么火。在Linux下不适用了。

论坛徽章:
0
4 [报告]
发表于 2005-11-03 09:24 |只看该作者
谢谢了.请问LINUX下图形库使用资料哪里好找一些//偶自己先找各
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP