When compiling cryptest.exe, I also had problems with the word 'hash'
clashing with STLport's template class of the same name. I simply renamed
the problem occurances to '_hash' in these places:
iterhash.h:
line 56
line 90
line 102
bench.cpp:
line154
line 168
After all that, it now works properly with STLport 4.5.3 here (all tests
pass). Note however that STLport seems to be overriding some warning
pragmas, as I'm now getting more warnings about various things...
--
gl
----- Original Message -----
From: "gl" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, February 02, 2003 3:54 AM
Subject: STLport again.
>
> (Crypto++5, MSVC6 SP5 + Processor Pack, STLport 4.5.3)
>
>
> New problem. I applied the STLport patch kindly posted by Eric Frias, and
> it did indeed fix some problems - however, I have a remaining error:
>
> Errors:
>
> N:\_Projects\_libs\cryptlib5.0\integer.cpp(2724) : error C2275:
> '_STL::char_traits' : illegal use of this type as an expression
> N:\_Projects\_libs\cryptlib5.0\integer.cpp(2782) : see reference
to
> function template instantiation 'class CryptoPP::Integer __cdecl
> CryptoPP::StringToInteger(const char *)' being compiled
> N:\_Projects\_libs\cryptlib5.0\integer.cpp(2724) : error C2039: 'length' :
> is not a member of '`global namespace''
> N:\_Projects\_libs\cryptlib5.0\integer.cpp(2782) : see reference
to
> function template instantiation 'class CryptoPP::Integer __cdecl
> CryptoPP::StringToInteger(const char *)' being compiled
> N:\_Projects\_libs\cryptlib5.0\integer.cpp(2724) : error C2064: term does
> not evaluate to a function
> N:\_Projects\_libs\cryptlib5.0\integer.cpp(2782) : see reference
to
> function template instantiation 'class CryptoPP::Integer __cdecl
> CryptoPP::StringToInteger(const char *)' being compiled
> N:\_Projects\_libs\cryptlib5.0\integer.cpp(2724) : error C2275:
> '_STL::char_traits' : illegal use of this type as an expression
> N:\_Projects\_libs\cryptlib5.0\integer.cpp(2788) : see reference
to
> function template instantiation 'class CryptoPP::Integer __cdecl
> CryptoPP::StringToInteger(const unsigned short *)' being compiled
> N:\_Projects\_libs\cryptlib5.0\integer.cpp(2724) : error C2039: 'length' :
> is not a member of '`global namespace''
> N:\_Projects\_libs\cryptlib5.0\integer.cpp(2788) : see reference
to
> function template instantiation 'class CryptoPP::Integer __cdecl
> CryptoPP::StringToInteger(const unsigned short *)' being compiled
> N:\_Projects\_libs\cryptlib5.0\integer.cpp(2724) : error C2064: term does
> not evaluate to a function
> N:\_Projects\_libs\cryptlib5.0\integer.cpp(2788) : see reference
to
> function template instantiation 'class CryptoPP::Integer __cdecl
> CryptoPP::StringToInteger(const unsigned short *)' being compiled
> iterhash.cpp
>
>
> The problem line is at line 2724 in integer.cpp:
>
> unsigned int length = std::char_traits<T>::length(str);
>
>
> I managed to work around it by uncommenting things to use the GCC
> workaround:
>
> //#if (defined(__GNUC__) && __GNUC__ <= 3) // GCC workaround
> // std::char_traits doesn't exist in GCC 2.x
> // std::char_traits<wchar_t>::length() not defined in GCC 3.2
> unsigned int length;
> for (length = 0; str[length] != 0; length++) {}
> //#else
> //unsigned int length = std::char_traits<T>::length(str);
> //#endif
>
> Does anyone know how to get 'std::char_traits<T>::length(str)' to work
with
> STLport?
> --
> gl
>