I compiled nss on FreeBSD platform, and wrote a program .
My program use function SECU_ReadDERFromFile, like this

#include "secutil.h"
......
rv = SECU_ReadDERFromFile(&certDER, inFile, PR_TRUE);
......


This function is in libsectool.a

#nm libsectool.a |grep SECU_Read
00001290 T SECU_ReadDERFromFile

when I compile my program, it can generate .o file. but can't make 
executable file. error message like this:

g++ -o certools ./certool/GetDNToDB.o 
./certool/pk12util.o -L. -L./lib -Wl,-rpath-link,./lib -lsectool -lssl3 
-lsmime3 
 -lnss3 -lplc4 -lplds4 -lnspr4 -lpthread -lc -fpic
./lib/libsoftokn3.so: warning: warning: mktemp() possibly used unsafely; 
consider using mkstemp()
./certool/GetDNToDB.o(.text+0xc9e): In function `GetCertFullDN(char*)':
: undefined reference to `SECU_ReadDERFromFile(SECItemStr*, PRFileDesc*, 
int)'
gmake: *** [certool] Error 1

I try other functions in libsectool.a which is defined in secutil.h. it also 
can't been use. I feel so  despondent.

Why?? I have already include header file(secutil.h). Anyone can give me some 
suggestions? Please help me.

Many thanks 


_______________________________________________
dev-tech-crypto mailing list
dev-tech-crypto@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-tech-crypto

Reply via email to