Dear all,
Has anyone tried to compile Crypto++ 5.2.1 under Microsoft newly
released VC++ 2005 Express Edition + Platform SDK?
I tried that and got a lengthy error at one particular line, I mean
one line of code in dll.cpp produces the lengthy error. All other
files and projects seem to be OK.
Excerpt from dll.cpp:
template <class EC> void DL_GroupParameters_EC<EC>::Initialize(const OID &oid)
{
const EcRecommendedParameters<EllipticCurve> *begin, *end;
GetRecommendedParameters(begin, end);
const EcRecommendedParameters<EllipticCurve> *it =
std::lower_bound(begin, end, oid, OIDLessThan()); << I believe
this is the line that produce the following:
1>Compiling...
1>dll.cpp
1>C:\Program Files\Microsoft Visual Studio 8\VC\include\xutility(290)
: error C2664: 'bool CryptoPP::OIDLessThan::operator
()<CryptoPP::ECP>(const CryptoPP::OID &,const
CryptoPP::EcRecommendedParameters<CryptoPP::ECP> &)' : cannot convert
parameter 1 from 'const
CryptoPP::EcRecommendedParameters<CryptoPP::ECP>' to 'const
CryptoPP::OID &'
1> Reason: cannot convert from 'const
CryptoPP::EcRecommendedParameters<CryptoPP::ECP>' to 'const
CryptoPP::OID'
1> No user-defined-conversion operator available that can
perform this conversion, or the operator cannot be called
1> C:\Program Files\Microsoft Visual Studio
8\VC\include\xutility(1469) : see reference to function template
instantiation 'bool
std::_Debug_lt_pred<_Pr,CryptoPP::EcRecommendedParameters<CryptoPP::ECP>,CryptoPP::EcRecommendedParameters<CryptoPP::ECP>>(_Pr,const
_Ty1 &,const _Ty2 &,const wchar_t *,unsigned int)' being compiled
1> with
1> [
1> _Pr=CryptoPP::OIDLessThan,
1> _Ty1=CryptoPP::EcRecommendedParameters<CryptoPP::ECP>,
1> _Ty2=CryptoPP::EcRecommendedParameters<CryptoPP::ECP>
1> ]
1> C:\Program Files\Microsoft Visual Studio
8\VC\include\xutility(1479) : see reference to function template
instantiation 'void
std::_Debug_order_single2<_InIt,_Pr>(_FwdIt,_FwdIt,_Pr,bool,const
wchar_t *,unsigned int,std::forward_iterator_tag)' being compiled
1> with
1> [
1> _InIt=const CryptoPP::EcRecommendedParameters<CryptoPP::ECP> *,
1> _Pr=CryptoPP::OIDLessThan,
1> _FwdIt=const CryptoPP::EcRecommendedParameters<CryptoPP::ECP> *
1> ]
1> C:\Program Files\Microsoft Visual Studio
8\VC\include\algorithm(2018) : see reference to function template
instantiation 'void
std::_Debug_order_single<_FwdIt,_Pr>(_InIt,_InIt,_Pr,bool,const
wchar_t *,unsigned int)' being compiled
1> with
1> [
1> _FwdIt=const CryptoPP::EcRecommendedParameters<CryptoPP::ECP> *,
1> _Pr=CryptoPP::OIDLessThan,
1> _InIt=const CryptoPP::EcRecommendedParameters<CryptoPP::ECP> *
1> ]
1> C:\Program Files\Microsoft Visual Studio
8\VC\include\algorithm(2042) : see reference to function template
instantiation '_FwdIt std::_Lower_bound<const
CryptoPP::EcRecommendedParameters<CryptoPP::ECP>*,_Ty,std::iterator_traits<_Iter>::difference_type,_Pr>(_FwdIt,_FwdIt,const
_Ty &,_Pr,_Diff *)' being compiled
1> with
1> [
1> _FwdIt=const CryptoPP::EcRecommendedParameters<CryptoPP::ECP> *,
1> _Ty=CryptoPP::OID,
1> _Iter=const CryptoPP::EcRecommendedParameters<CryptoPP::ECP> *,
1> _Pr=CryptoPP::OIDLessThan,
1> _Diff=std::iterator_traits<const
CryptoPP::EcRecommendedParameters<CryptoPP::ECP> *>::difference_type
1> ]
1> c:\projects\vc++\cryptopp521\eccrypto.cpp(371) : see
reference to function template instantiation '_FwdIt
std::lower_bound<const
CryptoPP::EcRecommendedParameters<CryptoPP::ECP>*,CryptoPP::OID,CryptoPP::OIDLessThan>(_FwdIt,_FwdIt,const
_Ty &,_Pr)' being compiled
1> with
1> [
1> _FwdIt=const CryptoPP::EcRecommendedParameters<CryptoPP::ECP> *,
1> _Ty=CryptoPP::OID,
1> _Pr=CryptoPP::OIDLessThan
1> ]
1> c:\projects\vc++\cryptopp521\eccrypto.cpp(368) : while
compiling class template member function 'void
CryptoPP::DL_GroupParameters_EC<EC>::Initialize(const CryptoPP::OID
&)'
1> with
1> [
1> EC=CryptoPP::ECP
1> ]
1> c:\projects\vc++\cryptopp521\eccrypto.h(140) : see reference
to class template instantiation 'CryptoPP::DL_GroupParameters_EC<EC>'
being compiled
1> with
1> [
1> EC=CryptoPP::ECP
1> ]
1>C:\Program Files\Microsoft Visual Studio 8\VC\include\xutility(292)
: error C2664: 'bool CryptoPP::OIDLessThan::operator
()<CryptoPP::ECP>(const CryptoPP::OID &,const
CryptoPP::EcRecommendedParameters<CryptoPP::ECP> &)' : cannot convert
parameter 1 from 'const
CryptoPP::EcRecommendedParameters<CryptoPP::ECP>' to 'const
CryptoPP::OID &'
1> Reason: cannot convert from 'const
CryptoPP::EcRecommendedParameters<CryptoPP::ECP>' to 'const
CryptoPP::OID'
1> No user-defined-conversion operator available that can
perform this conversion, or the operator cannot be called
1>C:\Program Files\Microsoft Visual Studio 8\VC\include\xutility(290)
: error C2664: 'bool CryptoPP::OIDLessThan::operator
()<CryptoPP::EC2N>(const CryptoPP::OID &,const
CryptoPP::EcRecommendedParameters<CryptoPP::EC2N> &)' : cannot convert
parameter 1 from 'const
CryptoPP::EcRecommendedParameters<CryptoPP::EC2N>' to 'const
CryptoPP::OID &'
1> Reason: cannot convert from 'const
CryptoPP::EcRecommendedParameters<CryptoPP::EC2N>' to 'const
CryptoPP::OID'
1> No user-defined-conversion operator available that can
perform this conversion, or the operator cannot be called
1> C:\Program Files\Microsoft Visual Studio
8\VC\include\xutility(1469) : see reference to function template
instantiation 'bool
std::_Debug_lt_pred<_Pr,CryptoPP::EcRecommendedParameters<CryptoPP::EC2N>,CryptoPP::EcRecommendedParameters<CryptoPP::EC2N>>(_Pr,const
_Ty1 &,const _Ty2 &,const wchar_t *,unsigned int)' being compiled
1> with
1> [
1> _Pr=CryptoPP::OIDLessThan,
1> _Ty1=CryptoPP::EcRecommendedParameters<CryptoPP::EC2N>,
1> _Ty2=CryptoPP::EcRecommendedParameters<CryptoPP::EC2N>
1> ]
1> C:\Program Files\Microsoft Visual Studio
8\VC\include\xutility(1479) : see reference to function template
instantiation 'void
std::_Debug_order_single2<_InIt,_Pr>(_FwdIt,_FwdIt,_Pr,bool,const
wchar_t *,unsigned int,std::forward_iterator_tag)' being compiled
1> with
1> [
1> _InIt=const CryptoPP::EcRecommendedParameters<CryptoPP::EC2N> *,
1> _Pr=CryptoPP::OIDLessThan,
1> _FwdIt=const CryptoPP::EcRecommendedParameters<CryptoPP::EC2N> *
1> ]
1> C:\Program Files\Microsoft Visual Studio
8\VC\include\algorithm(2018) : see reference to function template
instantiation 'void
std::_Debug_order_single<_FwdIt,_Pr>(_InIt,_InIt,_Pr,bool,const
wchar_t *,unsigned int)' being compiled
1> with
1> [
1> _FwdIt=const CryptoPP::EcRecommendedParameters<CryptoPP::EC2N> *,
1> _Pr=CryptoPP::OIDLessThan,
1> _InIt=const CryptoPP::EcRecommendedParameters<CryptoPP::EC2N> *
1> ]
1> C:\Program Files\Microsoft Visual Studio
8\VC\include\algorithm(2042) : see reference to function template
instantiation '_FwdIt std::_Lower_bound<const
CryptoPP::EcRecommendedParameters<CryptoPP::EC2N>*,_Ty,std::iterator_traits<_Iter>::difference_type,_Pr>(_FwdIt,_FwdIt,const
_Ty &,_Pr,_Diff *)' being compiled
1> with
1> [
1> _FwdIt=const CryptoPP::EcRecommendedParameters<CryptoPP::EC2N> *,
1> _Ty=CryptoPP::OID,
1> _Iter=const CryptoPP::EcRecommendedParameters<CryptoPP::EC2N> *,
1> _Pr=CryptoPP::OIDLessThan,
1> _Diff=std::iterator_traits<const
CryptoPP::EcRecommendedParameters<CryptoPP::EC2N> *>::difference_type
1> ]
1> c:\projects\vc++\cryptopp521\eccrypto.cpp(371) : see
reference to function template instantiation '_FwdIt
std::lower_bound<const
CryptoPP::EcRecommendedParameters<CryptoPP::EC2N>*,CryptoPP::OID,CryptoPP::OIDLessThan>(_FwdIt,_FwdIt,const
_Ty &,_Pr)' being compiled
1> with
1> [
1> _FwdIt=const CryptoPP::EcRecommendedParameters<CryptoPP::EC2N> *,
1> _Ty=CryptoPP::OID,
1> _Pr=CryptoPP::OIDLessThan
1> ]
1> c:\projects\vc++\cryptopp521\eccrypto.cpp(368) : while
compiling class template member function 'void
CryptoPP::DL_GroupParameters_EC<EC>::Initialize(const CryptoPP::OID
&)'
1> with
1> [
1> EC=CryptoPP::EC2N
1> ]
1> c:\projects\vc++\cryptopp521\eccrypto.h(141) : see reference
to class template instantiation 'CryptoPP::DL_GroupParameters_EC<EC>'
being compiled
1> with
1> [
1> EC=CryptoPP::EC2N
1> ]
1>C:\Program Files\Microsoft Visual Studio 8\VC\include\xutility(292)
: error C2664: 'bool CryptoPP::OIDLessThan::operator
()<CryptoPP::EC2N>(const CryptoPP::OID &,const
CryptoPP::EcRecommendedParameters<CryptoPP::EC2N> &)' : cannot convert
parameter 1 from 'const
CryptoPP::EcRecommendedParameters<CryptoPP::EC2N>' to 'const
CryptoPP::OID &'
1> Reason: cannot convert from 'const
CryptoPP::EcRecommendedParameters<CryptoPP::EC2N>' to 'const
CryptoPP::OID'
1> No user-defined-conversion operator available that can
perform this conversion, or the operator cannot be called
I have looked through the patch of different version + compiler,
trying to find the clue, but eventually get lost...
Any clue or pointer would be appreciated.
Thanks & best regards,
--
WH Tan