Hi, I know this might seem a little silly but I seem to be having a lot of
trouble including cryptopp in my project.

I have successfully compiled the Cryptopp source files and have the dll
and libraries but when I put the dll and cryptopp.lib in my projects root
folder, add the dll.h to my class and include the Cryptopp rot folder as
another include folder to be searched for header files I still get errors
and a lot of warnings.

Example I added the following to my class


std::string MClient::RSAEncryptString(const char *pubFilename, const char
*seed, const char *message)
{   // files.h - gets included in dll.h ?!?
        FileSource pubFile(pubFilename, true, new HexDecoder);
        RSAES_OAEP_SHA_Encryptor pub(pubFile);

        RandomPool randPool;
        randPool.Put((byte *)seed, strlen(seed));

        std::string result;
        StringSource(message, true, new PK_EncryptorFilter(randPool, pub, new
HexEncoder(new StringSink(result))));
        return result;
}

which was from the test.cpp file and I have the same headers included at
the test.cpp file does but I still get errors like the following..


--------------------Configuration: Client - Win32 Debug--------------------
Compiling...
MClient.cpp
d:\program files\microsoft visual
studio\myprojects\client\mclient.cpp(247) : error C2065: 'FileSource' :
undeclared identifier
d:\program files\microsoft visual
studio\myprojects\client\mclient.cpp(247) : error C2146: syntax error :
missing ';' before identifier 'pubFile'
d:\program files\microsoft visual
studio\myprojects\client\mclient.cpp(247) : error C2065: 'pubFile' :
undeclared identifier
d:\program files\microsoft visual
studio\myprojects\client\mclient.cpp(247) : error C2061: syntax error :
identifier 'HexDecoder'
d:\program files\microsoft visual
studio\myprojects\client\mclient.cpp(248) : error C2065:
'RSAES_OAEP_SHA_Encryptor' : undeclared identifier
d:\program files\microsoft visual
studio\myprojects\client\mclient.cpp(248) : error C2146: syntax error :
missing ';' before identifier 'pub'
d:\program files\microsoft visual
studio\myprojects\client\mclient.cpp(248) : error C2065: 'pub' :
undeclared identifier
d:\program files\microsoft visual
studio\myprojects\client\mclient.cpp(250) : error C2065: 'RandomPool' :
undeclared identifier
d:\program files\microsoft visual
studio\myprojects\client\mclient.cpp(250) : error C2146: syntax error :
missing ';' before identifier 'randPool'
d:\program files\microsoft visual
studio\myprojects\client\mclient.cpp(250) : error C2065: 'randPool' :
undeclared identifier
d:\program files\microsoft visual
studio\myprojects\client\mclient.cpp(251) : error C2228: left of '.Put'
must have class/struct/union type
d:\program files\microsoft visual
studio\myprojects\client\mclient.cpp(254) : error C2065: 'StringSource' :
undeclared identifier
d:\program files\microsoft visual
studio\myprojects\client\mclient.cpp(254) : error C2061: syntax error :
identifier 'PK_EncryptorFilter'
d:\program files\microsoft visual
studio\myprojects\client\mclient.cpp(254) : error C2143: syntax error :
missing ')' before ';'
d:\program files\microsoft visual
studio\myprojects\client\mclient.cpp(256) : error C2143: syntax error :
missing ')' before '}'
d:\program files\microsoft visual
studio\myprojects\client\mclient.cpp(256) : error C2143: syntax error :
missing ';' before ')'
Error executing cl.exe.
Creating browse info file...

Client.exe - 16 error(s), 0 warning(s)

I've searched google and the mailing archives for a solution but cant seem
to find it and I have a feeling that I'm going to start kicking myself
when I find out what I might be doing wrong ;(

I'm using MS VC 6 SP5 on a Win2000 machine.

If you can help me sort this out I'd be very grateful.

arden


Reply via email to