注册 登录
编程论坛 C图形专区

在turbo c编译出错!!

benzeen 发布于 2008-09-27 21:19, 1528 次点击
程序代码:
#include<graphics.h>
#include<stdio.h>
main()
{
     int graphdriver=VGA;
     int graphmode=VGAHI;
     initgraph(&graphdriver,&graphmode,"");
     cleardevice();
     moveto(100,20);
     lineto(100,80);
     moveto(200,20);
     lineto(100,80);
     line(100,90,200,90);
     linerel(0,20);
     moverel(-100,0);
     linerel(30,20);
     getch();
     closegraph();
     return 0;


}

错误信息:
---------- Compiler Link ----------
Invalid keyboard code specified
Turbo C++ Version 3.00 Copyright (c) 1992 Borland International
e:\c\cdemo\test1.c:
Turbo Link  Version 5.0 Copyright (c) 1992 Borland International
Error: Undefined symbol _closegraph in module e:\c\cdemo\test1.c
Error: Undefined symbol _linerel in module e:\c\cdemo\test1.c
Error: Undefined symbol _moverel in module e:\c\cdemo\test1.c
Error: Undefined symbol _line in module e:\c\cdemo\test1.c
Error: Undefined symbol _lineto in module e:\c\cdemo\test1.c
Error: Undefined symbol _moveto in module e:\c\cdemo\test1.c
Error: Undefined symbol _cleardevice in module e:\c\cdemo\test1.c
Error: Undefined symbol _initgraph in module e:\c\cdemo\test1.c

        Available memory 4125248

Output completed (0 sec consumed)
5 回复
#2
奔跑的鸟2008-09-28 20:18
Wintc下编译通过,你用的是TC++,应该是graphics库的图像函数有改动,去include 文件里看看吧
#3
奔跑的鸟2008-09-28 20:19
LZ是某位原版主的马甲。。。?
#4
benzeen2008-09-29 10:28
回复 3# 奔跑的鸟 的帖子
什么意思??
#5
奔跑的鸟2008-09-29 14:11
只是随便问问,我好久没来了,原来的版主都不见了呢:)
#6
benzeen2008-10-05 20:30
回复 5# 奔跑的鸟 的帖子
嗷嗷@@知道了!!
1