我打了一段c的代码,在turbo C3.0中没有运行出来,其中选择turbo C是绝对没问题的,求高人指点问题。
代码如下:#include<graphics.h>#include<stdio.h>voidmain(){intgdriver=DETECT,gmode;initgrap...
代码如下:
#include<graphics.h>
#include<stdio.h>
void main()
{
int gdriver=DETECT,gmode;
initgraph(&gdriver,&gmode,"D:\\trubo c\\TCPP30H\\BGI"); //这是我的图形驱动程序的目录路径
setcolor(GREEN);
rectangle(200,100,400,300);
getch();
closegraph();
}
编译没有问题,运行出问题了,系统提示:
Linker Error: Undefined symbol _closegraph in module NONAME00.C
Linker Error: Undefined symbol _retangle in module NONAME00.C
Linker Error: Undefined symbol _setcolor in module NONAME00.C
Linker Error: Undefined symbol _initgraph in module NONAME00.C
求解: 展开
#include<graphics.h>
#include<stdio.h>
void main()
{
int gdriver=DETECT,gmode;
initgraph(&gdriver,&gmode,"D:\\trubo c\\TCPP30H\\BGI"); //这是我的图形驱动程序的目录路径
setcolor(GREEN);
rectangle(200,100,400,300);
getch();
closegraph();
}
编译没有问题,运行出问题了,系统提示:
Linker Error: Undefined symbol _closegraph in module NONAME00.C
Linker Error: Undefined symbol _retangle in module NONAME00.C
Linker Error: Undefined symbol _setcolor in module NONAME00.C
Linker Error: Undefined symbol _initgraph in module NONAME00.C
求解: 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询