TC3.0中graphics.h链接错误的解决办法
程序在调用TC中的graphics.h时编译可以通过
但是链接却出现错误:
Linker Error: Undefined symbol _circle in module ..\nz.c
Linker Error: Undefined symbol _setcolor in module ..\nz.c
Linker Error: Undefined symbol _initgraph in module ..\nz.c
我想既然是链接错误了可能就是Linker出了问题,选择Options—>Linker->Libraries
在Graphics前面勾选,确定
链接成功。
另外,代码中
int gd=VGA,gm=VGAHI,errorcode;
initgraph(&gd,&gm,"E:\\Software\\TCv3.0");
errorcode = graphresult();
initgraph(&gd,&gm,"E:\\Software\\TCv3.0"); //此处路径要修改为文件“EGAVGA.BGI”所在路径