Colin Carter reported the following issue with VS2005 SP1 beta. In case others run into the same problem, it can be fixed by changing AllocatorBase<T>::pointer to AlignedAllocator<T>::pointer in integer.cpp.

----- Original Message ----- From: "Colin Carter" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, September 28, 2006 7:02 AM
Subject: Visual Studio, SP1-Beta Issue


Hi Wei Dai

We've been using your Crypto++ library for some time to do some simple
encryption stuff in an in-house app. It's been working fine in Visual Studio
2005 for quite some time.

I just downloaded and installed the Service Pack 1 Beta for VS 2005
(http://connect.microsoft.com/site/sitehome.aspx?SiteID=210 - you need to
apply for the beta, then download it a bit later when you get a reply).

Everything was working fine before, but now there is a compile error, and
I'm not familiar with templates enough to fix it.

The function on line 57 in the integer.cpp file:

template <class T>
CPP_TYPENAME AllocatorBase<T>::pointer
AlignedAllocator<T>::allocate(size_type n, const void *)

now generates the following error on compilation:

.\integer.cpp(90) : error C2244: 'CryptoPP::AlignedAllocator<T>::allocate' :
unable to match function definition to an existing declaration
c:\data\source\shaw\infocus\common\encryption\crypto\integer.h(44) :
see declaration of 'CryptoPP::AlignedAllocator<T>::allocate'
       definition
       'AllocatorBase<T>::pointer
CryptoPP::AlignedAllocator<T>::allocate(CryptoPP::AlignedAllocator<T>::size_
type,const void *)'
       existing declarations
       'T
*CryptoPP::AlignedAllocator<T>::allocate(CryptoPP::AlignedAllocator<T>::size
_type,const void *)'

I don't know if it's you who did the Visual Studio port, but perhaps you
could pass this on to them.

Thanks

Colin Carter
Chiona Technologies Inc.
[EMAIL PROTECTED]



Reply via email to