小程序编译出错
#include<graphics.h>void main()
{
int driver,mode;
int i;
driver=DETECT;
mode=0;
initgraph(&driver,&mode,"");
moveto(0,200);
for(i=0;i<16;i++)
{
setcolor(i);
linerel(20,0);
}
getch();
restorecrtmode();
}
提示信息:
Compiling D:\tu.c:
Linking c\tu.exe:
Linker Error:Undefined symbol _restorecrtmode in module d:tu.c
Linker Error:Undefined symbol _linerel in module d:tu.c
Linker Error:Undefined symbol _setcolor in module d:tu.c
Linker Error:Undefined symbol _moveto in module d:tu.c
Linker Error:Undefined symbol _initgraph in module d:tu.c