linux 下大数库 miracl 的使用方法,求高手指教

现在要做的东西,需要用到 miracl 大数库,在linux 环境中, 我也已经编译好了 miracl.a ,但在使用时总出现些错误
C/C++ code

//MAKEFILE 文件 如下
#source file
SOURCE    := $(wildcard *.c) $(wildcard *.cpp)
OBJS    := $(patsubst %.c,%.o,$(patsubst %.cpp,%.o,$(SOURCE))) 

#target you can change test to what you want 
TARGET    := ../bin/TEST

#compile and lib parameter 
CC    := g++
LIBS        :=miracl.a
LDFLAGS    := 
DEFINES    :=
INCLUDE    := -I../miracl/include
CFLAGS    := -g -Wall -O2 $(DEFINES) $(INCLUDE) 
CXXFLAGS:= $(CFLAGS) 


#i think you should do anything here
.PHONY : everything objs clean veryclean rebuild 

everything : $(TARGET)

all : $(TARGET)

objs : $(OBJS)    

rebuild: veryclean everything 
                
clean :
    rm -fr *.so
    rm -fr *.o
    rm -fr $(TARGET)

$(TARGET) :     $(OBJS)
    $(CC) $(CXXFLAGS) -o $@ $(OBJS) $(LDFLAGS) $(LIBS)  



用的时候就
#include "miracl.h"
#include "mirdef.h"
然后在一些地方使用 miracl *mip=mirsys(100,0); 等等.....
这样就出错,错误如下:

CryptRegInfo.cpp:76: undefined reference to `mirsys'
CryptRegInfo.cpp:99: undefined reference to `mirvar'
CryptRegInfo.cpp:100: undefined reference to `mirvar'
CryptRegInfo.cpp:101: undefined reference to `mirvar'
CryptRegInfo.cpp:102: undefined reference to `mirvar'
CryptRegInfo.cpp:105: undefined reference to `cinstr'
.........
在linux 下开发时间少,有些东西也不是很清楚

或者谁能给我个 linux 下使用 miracl 库的例子也可以,不甚感激

作者: jspkiss   发布时间: 2011-02-12

应该是编译的时候没有找到miracl 大数库
编译时,屏幕提示的具体命令行是什么?

作者: justkk   发布时间: 2011-02-12

g++ -g -Wall -O2 -I../miracl/include -c -o CryptRegInfo.o CryptRegInfo.cpp
CryptRegInfo.cpp:116:2: warning: no newline at end of file
g++ -g -Wall -O2 -I../miracl/include -o ../bin/TEST md5c.o CreateDomainMD5Key.o CryptRegInfo.o TEST.o miracl.a

这是make 后出现的,紧接着就出现了错误
CryptRegInfo.o: In function `CCryptRegInfo::Decrypt(char*, int, char*, int*)':
CryptRegInfo.cpp:75: undefined reference to `mirsys'
CryptRegInfo.cpp:98: undefined reference to `mirvar'
CryptRegInfo.cpp:99: undefined reference to `mirvar'
CryptRegInfo.cpp:100: undefined reference to `mirvar'
........
大数库,我在源文件目录下面放了一个

作者: jspkiss   发布时间: 2011-02-12

也就是说miracl.a与那些CreateDomainMD5Key.o CryptRegInfo.o 在同一个目录下?
用下面的命令看看miracl.a是多少位的?
file miracl.a

作者: justkk   发布时间: 2011-02-12

是在同一个目录下面

file miracl.a
miracl.a: current ar archive

作者: jspkiss   发布时间: 2011-02-12