在窗口回调函数WndProc中,需要调用一般函数Lagrange case IDM_Lagrange: // Lagrange响应函数
hdc=GetDC(hwnd);
Polyline(hdc,pt,iCount);
for(i=pt[0].x,j=0;i<pt[iCount].x; )
{
lpoint[j].x=i;
lpoint[j].y=(int)Lagrange(pt,iCount,i);
i+=10;
j++;
}
Polyline(hdc,lpoint,j-1);
ReleaseDC(hwnd,hdc);
return 0;
在编译的时候没有问题,连接的时候出现错误为:fatal error LNK1120: 1 unresolved externals
Lagrange函数为double Larange(POINT apt[],int N,double xx);经过验证函数不存在问题。当我把引用Lagrange函数的那一行注释掉以后,这个错误就没有了,这是什么原因引起的呢?
hdc=GetDC(hwnd);
Polyline(hdc,pt,iCount);
for(i=pt[0].x,j=0;i<pt[iCount].x; )
{
lpoint[j].x=i;
lpoint[j].y=(int)Lagrange(pt,iCount,i);
i+=10;
j++;
}
Polyline(hdc,lpoint,j-1);
ReleaseDC(hwnd,hdc);
return 0;
在编译的时候没有问题,连接的时候出现错误为:fatal error LNK1120: 1 unresolved externals
Lagrange函数为double Larange(POINT apt[],int N,double xx);经过验证函数不存在问题。当我把引用Lagrange函数的那一行注释掉以后,这个错误就没有了,这是什么原因引起的呢?
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货