C++ - Use CryptoPP

265 views
Skip to first unread message

nKnade

unread,
Mar 16, 2012, 11:17:58 AM3/16/12
to cryptop...@googlegroups.com
Im trying to get it running since a while^^

I now added the Project "cryptlib" as Dependency and included the cryptlib.h
Also i set the Include Path.


But im getting these Errors if i try to create :

error LNK2001: Nicht aufgelöstes externes Symbol ""public: virtual void __thiscall CryptoPP::IteratedHashBase<unsigned int,class CryptoPP::HashTransformation>::Update(unsigned char const *,unsigned int)" (?Update@?$IteratedHashBase@IVHashTransformation@CryptoPP@@@CryptoPP@@UAEXPBEI@Z)".
error LNK2001: Nicht aufgelöstes externes Symbol ""public: virtual unsigned char * __thiscall CryptoPP::IteratedHashBase<unsigned int,class CryptoPP::HashTransformation>::CreateUpdateSpace(unsigned int &)" (?CreateUpdateSpace@?$IteratedHashBase@IVHashTransformation@CryptoPP@@@CryptoPP@@UAEPAEAAI@Z)".
error LNK2001: Nicht aufgelöstes externes Symbol ""public: virtual void __thiscall CryptoPP::IteratedHashBase<unsigned int,class CryptoPP::HashTransformation>::Restart(void)" (?Restart@?$IteratedHashBase@IVHashTransformation@CryptoPP@@@CryptoPP@@UAEXXZ)".
error LNK2001: Nicht aufgelöstes externes Symbol ""public: virtual void __thiscall CryptoPP::IteratedHashBase<unsigned int,class CryptoPP::HashTransformation>::TruncatedFinal(unsigned char *,unsigned int)" (?TruncatedFinal@?$IteratedHashBase@IVHashTransformation@CryptoPP@@@CryptoPP@@UAEXPAEI@Z)".
error LNK2001: Nicht aufgelöstes externes Symbol ""public: virtual bool __thiscall CryptoPP::HashTransformation::TruncatedVerify(unsigned char const *,unsigned int)" (?TruncatedVerify@HashTransformation@CryptoPP@@UAE_NPBEI@Z)".
error LNK2001: Nicht aufgelöstes externes Symbol ""public: virtual unsigned int __thiscall CryptoPP::SHA256::HashMultipleBlocks(unsigned int const *,unsigned int)" (?HashMultipleBlocks@SHA256@CryptoPP@@UAEIPBII@Z)".
error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""public: __thiscall CryptoPP::Algorithm::Algorithm(bool)" (??0Algorithm@CryptoPP@@QAE@_N@Z)" in Funktion ""public: __thiscall CryptoPP::HashTransformation::HashTransformation(void)" (??0HashTransformation@CryptoPP@@QAE@XZ)".
error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""public: static void __cdecl CryptoPP::SHA256::Transform(unsigned int *,unsigned int const *)" (?Transform@SHA256@CryptoPP@@SAXPAIPBI@Z)" in Funktion ""protected: virtual void __thiscall CryptoPP::IteratedHashWithStaticTransform<unsigned int,struct CryptoPP::EnumToType<enum CryptoPP::ByteOrder,1>,64,32,class CryptoPP::SHA256,32,1>::HashEndianCorrectedBlock(unsigned int const *)" (?HashEndianCorrectedBlock@?$IteratedHashWithStaticTransform@IU?$EnumToType@W4ByteOrder@CryptoPP@@$00@CryptoPP@@$0EA@$0CA@VSHA256@2@$0CA@$00@CryptoPP@@MAEXPBI@Z)".
error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""public: static void __cdecl CryptoPP::SHA256::InitState(unsigned int *)" (?InitState@SHA256@CryptoPP@@SAXPAI@Z)" in Funktion ""protected: virtual void __thiscall CryptoPP::IteratedHashWithStaticTransform<unsigned int,struct CryptoPP::EnumToType<enum CryptoPP::ByteOrder,1>,64,32,class CryptoPP::SHA256,32,1>::Init(void)" (?Init@?$IteratedHashWithStaticTransform@IU?$EnumToType@W4ByteOrder@CryptoPP@@$00@CryptoPP@@$0EA@$0CA@VSHA256@2@$0CA@$00@CryptoPP@@MAEXXZ)".
2>C:\Users\...\Debug\Test.exe : fatal error LNK1120: 9 nicht aufgelöste externe Verweise.


Anyone knows the Solution?
Greetings :)

David Irvine

unread,
Mar 16, 2012, 11:22:46 AM3/16/12
to nKnade, cryptop...@googlegroups.com
Looks like these are linker errors, you need to link the cryptopp library.  Not sure which OS but on linux for instance you would do soemthing like 

g++ myfile.cc -lcryrptopp 

(or crypto++ or whatever the library file is called :-) )



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

nKnade

unread,
Mar 16, 2012, 12:13:09 PM3/16/12
to cryptop...@googlegroups.com, nKnade
First Thanks for you Answer. Im working on Windows.

But do i still need the Lib if i include the Projekt of the Lib as Dependency?
Even if i include it the errors dont change :)

David Irvine

unread,
Mar 16, 2012, 12:20:51 PM3/16/12
to nKnade, cryptop...@googlegroups.com
I imagine "Nicht aufgelöstes externes Symbol" means that the program is trying to locate code that's not implemented as it's in the library and it's not linked. 

In any case Wei and Jeff have a good page(s) here on these issues 

Hope this helps
David


nKnade

unread,
Mar 16, 2012, 2:19:45 PM3/16/12
to cryptop...@googlegroups.com, nKnade
Thanks!

Working Perfectly now

After 3 Hours of trying its Finaly Working^^

Best Regards
Reply all
Reply to author
Forward
0 new messages