照着MIRAC说明文档上的内容复制的程序不能link成功,显示:
--------------------Configuration: dddd - Win32 Debug--------------------
Compiling...
dddd.c
Linking...
dddd.obj : error LNK2001: unresolved external symbol _otnum
dddd.obj : error LNK2001: unresolved external symbol _premult
dddd.obj : error LNK2001: unresolved external symbol _mirvar
dddd.obj : error LNK2001: unresolved external symbol _mirsys
Debug/dddd.exe : fatal error LNK1120: 4 unresolved externals
Error executing link.exe.
dddd.exe - 5 error(s), 0 warning(s)
源代码如下:
/*
* Program to calculate factorials.
*/
#include <stdio.h>
#include <miracl.h> /* include MIRACL system */
void main()
{ /* calculate factorial of number */
big nf; /* declare "big" variable nf */
int n;
miracl *mip=mirsys(5000,10);
/* base 10, 5000 digits per big */
nf=mirvar(1); /* initialise big variable nf=1 */
printf("factorial program\n");
printf("input number n= \n");
scanf("%d",&n);
getchar();
while (n>1)
premult(nf,n--,nf); /* nf=n!=n*(n-1)*...2*1 */
printf("n!= \n");
otnum(nf,stdout); /* output result */
}
请高手指点
[招生]科锐逆向工程师培训(2024年11月15日实地,远程教学同时开班, 第51期)