#include "stdio.h"
#include "graphics.h"
void DrawPeaceSymbol(double x,double y,double r);
void main()
{
InitGraphics();
DrawPeaceSymbol(10,10,5);
}
void DrawPeaceSymbol(double x,double y,double r)
{
double current_x,current_y;
MovePen(x+r,y);
DrawArc(r,0,360);
DrawArc(r,0,-45);
current_x=GetCurrentX();
current_y=GetCurrentY();
DrawLine(x-current_x,y-current_y);
DrawLine(x-current_x,current_y-y);
MovePen(x,y);
DrawLine(x,r);
MovePen(x,y);
DrawLine(x,-r);
}
编译可以通过,链接的时候提示出错:
Linking...
7.4.obj : error LNK2001: unresolved external symbol _InitGraphics
7.4.obj : error LNK2001: unresolved external symbol _DrawLine
7.4.obj : error LNK2001: unresolved external symbol _GetCurrentY
7.4.obj : error LNK2001: unresolved external symbol _GetCurrentX
7.4.obj : error LNK2001: unresolved external symbol _DrawArc
7.4.obj : error LNK2001: unresolved external symbol _MovePen
Debug/7.4.exe : fatal error LNK1120: 6 unresolved externals
Error executing link.exe.
不知道是什么原因?