You need to make sure that the calling convention used by Crypto++ and
your program are the same. This is in project/settings/"c/c++"/code
generation.

On Mon, Nov 04, 2002 at 08:03:45PM -0700, D. R. Evans wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> This has me completely stumped. Maybe a bunch of fresh eyes can suggest 
> what's going wrong.
> 
> I have built and installed crypto++ 5.0 on a Win98 system, using VC++ 6.0.
> 
> The installation went OK (with the usual caveat that the build had to be 
> repeated numerous times before everything actually compiled).
> 
> The cryptest.exe program links fine against the library.
> 
> BUT when I try to link my own code against the library, I get a small 
> number of link errors. The linker is finding the library OK, because a ton 
> of other references into the library are getting resolved just fine.
> 
> Here are the first few link errors I am seeing (there are about 15 in all). 
> I can't see what these have in common, and why other references (such as to 
> RSASSA_PKCS1v15_SHA_Signer, for example) are resolved properly. In each 
> case, the name of the function is preceded by "myenclib.lib(RSAstuff.obj) : 
> error LNK2001: unresolved external symbol":
> 
> "class CryptoPP::RandomNumberGenerator & __cdecl CryptoPP::NullRNG(void)" 
> ([EMAIL PROTECTED]@@[EMAIL PROTECTED]@XZ)
> 
> "void __cdecl CryptoPP::BERDecodeNull(class 
> CryptoPP::BufferedTransformation &)" 
> ([EMAIL PROTECTED]@@[EMAIL PROTECTED]@@Z)
> 
> "void __cdecl CryptoPP::DEREncodeNull(class 
> CryptoPP::BufferedTransformation &)" 
> ([EMAIL PROTECTED]@@[EMAIL PROTECTED]@@Z)
> 
> "void __cdecl CryptoPP::AssignIntToInteger(void *,void const *)" 
> ([EMAIL PROTECTED]@@[EMAIL PROTECTED])
> 
> Anyone have any idea as to what might be going on? I expect(/hope) that 
> it's something really stupid and obvious....
> 
>   Doc
> 
> PS FWIW, here is the one place in my source code that references NullRNG:
> 
>       signervar.SignMessage(NullRNG(), (const unsigned 
> char*)(to_sign_cp.ptr()), to_sign.length(), cp.ptr());
> 
> signervar is a RSASSA_PKCS1v15_SHA_Signer.
> 
> 
> 
> -----BEGIN PGP SIGNATURE-----
> Version: PGP 6.0.2 -- QDPGP 2.60 
> Comment: Key obtainable from servers: ID 0x362912B8
> 
> iQA/AwUBPcc1EmnXrLw2KRK4EQJQzQCgim0hiT40M4swHbDdzxvUfBHnbZwAn0e7
> QEaqpmeqWej0CulvRMbSDw7O
> =fjk3
> -----END PGP SIGNATURE-----

Reply via email to