Hello all,

I apologize in advance if this problem has been addressed, but I've
been searching the mailing list and the web for several days now and
have not been able to find an answer. I have successfully compiled
'dlltest' and wanted to use Diffie-Hellman for my key exchange (I'm
using the FIPS validated DLL version 5.0.4). I pretty much copied the
sample code from the wiki page and ended up with the code below:

AutoSeededRandomPool arngA;
RandomNumberGenerator& rngA = *dynamic_cast < RandomNumberGenerator *
> ( &arngA );

DH dhA ( rngA, 128 );

Integer iPrime = dhA.GetGroupParameters ( ).GetModulus ( );
Integer iGenerator = dhA.GetGroupParameters ( ).GetSubgroupGenerator
( );

AutoSeededRandomPool arngB;
RandomNumberGenerator& rngB = *dynamic_cast < RandomNumberGenerator *
> ( &arngB );

DH dhB ( iPrime, iGenerator );

The last line of code "DH dhB ( iPrime, iGenerator );" causes this
link error:

dlltest.obj : error LNK2001: unresolved external symbol
"__declspec(dllimport) public: __thiscall CryptoPP::DH_Domain<class
CryptoPP::DL_GroupParameters_GFP_DefaultSafePrime,struct
CryptoPP::EnumToType<enum CryptoPP::CofactorMultiplicationOption,0>
>::DH_Domain<class CryptoPP::DL_GroupParameters_GFP_DefaultSafePrime,struct 
>CryptoPP::EnumToType<enum CryptoPP::CofactorMultiplicationOption,0> >(class 
>DH_Domain<class CryptoPP::DL_GroupParameters_GFP_DefaultSafePrime,struct 
>CryptoPP::EnumToType<enu
m CryptoPP::CofactorMultiplicationOption,0> >::Integer const &,class
DH_Domain<class
CryptoPP::DL_GroupParameters_GFP_DefaultSafePrime,struct
CryptoPP::EnumToType<enum CryptoPP::CofactorMultiplicationOption,0>
>::Integer const &)" (__imp_??0?$DH_Dom
[EMAIL PROTECTED]@CryptoPP@@U?
[EMAIL PROTECTED]@CryptoPP@@
$0A@@2@@CryptoPP@@[EMAIL PROTECTED]@[EMAIL PROTECTED]@Z)
DLL_Debug/dlltest.exe : fatal error LNK1120: 1 unresolved externals

It appears this issue has come up before with no resolution:
http://groups.google.com/group/cryptopp-users/browse_thread/thread/f89efa810813bed9/8a8bc8d3bb11ff47?lnk=gst&q=lnk2001+dh#8a8bc8d3bb11ff47

Any input or suggestions would be appreciated.

Thanks,

Trung
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the "Crypto++ Users" 
Google Group.
To unsubscribe, send an email to [EMAIL PROTECTED]
More information about Crypto++ and this group is available at 
http://www.cryptopp.com.
-~----------~----~----~----~------~----~------~--~---

Reply via email to