Hello,

I have problem with Turbo C++ 2006 and Cryptopp 5.6.0.
I have downloaded Cryptopp 5.6.0 and builded lib file from
cryptlib_bds.bdsproj.
I added cryptlib_bds.lib to my project but when I'm trying co compile
it i get errors:

[Linker Error] Error: Unresolved external
'CryptoPP::IteratedHashBase<unsigned int,
CryptoPP::HashTransformation>::Update(const unsigned char *, unsigned
int)' referenced from C:\test\DEBUG_BUILD\UNIT5.OBJ

[Linker Error] Error: Unresolved external
'CryptoPP::IteratedHashBase<unsigned int,
CryptoPP::HashTransformation>::CreateUpdateSpace(unsigned int&)'
referenced from C:\test\DEBUG_BUILD\UNIT5.OBJ

[Linker Error] Error: Unresolved external
'CryptoPP::IteratedHashBase<unsigned int,
CryptoPP::HashTransformation>::Restart()' referenced from C:\test
\UNIT5.OBJ

[Linker Error] Error: Unresolved external
'CryptoPP::IteratedHashBase<unsigned int,
CryptoPP::HashTransformation>::TruncatedFinal(unsigned char *,
unsigned int)' referenced from C:\test\DEBUG_BUILD\UNIT5.OBJ

[Linker Error] Error: Unresolved external
'CryptoPP::IteratedHashBase<unsigned int,
CryptoPP::HashTransformation>::HashMultipleBlocks(const unsigned int
*, unsigned int)' referenced from C:\test\UNIT5.OBJ

This is code I'm trying to compile:

//---------------------------------------------------------------------------
#pragma hdrstop
#include <iostream>
#include <cstring>
#include "cryptopp/modes.h"
#include "cryptopp/aes.h"
#include "cryptopp/sha.h"
#include "cryptopp/files.h"
#include "cryptopp/filters.h"
#include "cryptopp/osrng.h"

#pragma argsused
using namespace CryptoPP;
int main(int argc, char* argv[])
{
        char *password="secert_password";
        char *inFile="d:\\test\\1.jpg";
        char *outFile="d:\\test\\1.jpg.enc";
        byte key[AES::DEFAULT_KEYLENGTH], iv[AES::BLOCKSIZE];
        AutoSeededRandomPool rng;
        rng.GenerateBlock(iv, AES::BLOCKSIZE);

        StringSource(password, true, new HashFilter(*(new SHA256), new
ArraySink(key, AES::BLOCKSIZE)));

        CFB_Mode<AES >::Encryption cfbEncryption(key, AES::DEFAULT_KEYLENGTH,
iv);

        FileSource(inFile, true,
                new StreamTransformationFilter(cfbEncryption, new 
FileSink(outFile))
                );

        return 0;
}
//---------------------------------------------------------------------------


P.S Is that code correct?

-- 
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