Hi everybody

I'm new to Crypto++, using version 5.1 with MSVC 6 and Windows NT.

Here is the deal :
- the lib compiles perfectly, no warning, and cryptest as well.
- I tried it in a little program (not using MFC) just to encrypt a string
using AES : OK.
- I have a big application, with the main project using MFC. When I insert
the lines :

        #include "../cryptopp/modes.h"
        #include "../cryptopp/aes.h"
        using namespace CryptoPP;

in a file within this project, I get a lot of warnings and a compiler
internal error.
Here are the first warnings (in fact I get many more):

c:\atgl40\microsoft visual studio\v60\vc98\include\xmemory(39) : warning
C4100: '_P' : unreferenced formal parameter
c:\atgl40\microsoft visual studio\v60\vc98\include\xmemory(41) : warning
C4100: '_P' : unreferenced formal parameter
c:\atgl40\microsoft visual studio\v60\vc98\include\xlocale(296) : warning
C4663: C++ language change: to explicitly specialize class template
'codecvt' use the following syntax:
        template<> class codecvt<unsigned short,char,int> ...
c:\atgl40\microsoft visual studio\v60\vc98\include\xlocale(387) : warning
C4018: '<' : signed/unsigned mismatch
c:\atgl40\microsoft visual studio\v60\vc98\include\xlocale(519) : warning
C4663: C++ language change: to explicitly specialize class template 'ctype'
use the following syntax:
        template<> class ctype<char> ...
c:\atgl40\microsoft visual studio\v60\vc98\include\xlocale(552) : warning
C4100: '_D' : unreferenced formal parameter
c:\atgl40\microsoft visual studio\v60\vc98\include\xlocale(554) : warning
C4100: '_D' : unreferenced formal parameter

And here is is the fatal error :

c:\2kan\cryptopp\simple.h(14) : fatal error C1001: INTERNAL COMPILER ERROR
        (compiler file 'msc1.cpp', line 1794) 


- So I tried to insert a new project, not using MFC, in the workspace.
I put the little function that had worked the first time in it :

*********************************************************************
#include "../../cryptopp/modes.h"
#include "../../cryptopp/aes.h"
using namespace CryptoPP;

int TestCrypto()
{
        byte key[AES::DEFAULT_KEYLENGTH], iv[AES::BLOCKSIZE];
    // initialize key and iv here
    CFB_Mode<AES >::Encryption cfbEncryption(key, AES::DEFAULT_KEYLENGTH,
iv);

    byte plaintext[100],  plaintext2[100], ciphertext[100];
    // put data into plaintext here

    // encrypt
    cfbEncryption.ProcessData(ciphertext, plaintext, 100);

    // now decrypt
    CFB_Mode<AES >::Decryption cfbDecryption(key, 16, iv);
    cfbDecryption.ProcessData(plaintext2, ciphertext, 100);

        return 0;
}
*********************************************************************

This new project compiles well into a lib. But when I compile the main one
(with an include to a .h describing this function), I get this link error
message :

Linking...
   Creating library .\Debug/Tai.lib and object .\Debug/Tai.exp
cipher.obj : error LNK2001: unresolved external symbol "int __cdecl
TestCrypto(void)" (?TestCrypto@@YAHXZ)
.\Debug/Tai.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.


I really don't know what to try now..
I tried a few tricks involving precompiled headers, but I don't really know
how those things work.
Any idea welcome ! I would really appreciate using Crypto++.

Thanx in advance !

-- 
C�dric Mallet 

Reply via email to