Hi All,
I'm running VC++ .NET 2002 on a Windows 2000 box. I have recently
downloaded Crypto++ 5.2.1. I open the .dsw Workspace file, convert all
contained projects over to VC7 format, and then attempt to compile the
cryptlib project.
I get the following error:
------ Build started: Project: cryptlib, Configuration: Debug Win32 ------
Compiling...
zdeflate.cpp
C:\Program Files\Microsoft Visual Studio .NET\Vc7\include\xutility(98) :
error C2825: '_Iter::iterator_category': cannot form a qualified name
C:\Program Files\Microsoft Visual Studio
..NET\Vc7\include\xutility(607) : see reference to class template
instantiation 'std::iterator_traits<_Iter>' being compiled
with
[
_Iter=unsigned int *
]
zdeflate.cpp(644) : see reference to class template instantiation
'std::reverse_iterator<_RanIt>' being compiled
with
[
_RanIt=unsigned int *
]
C:\Program Files\Microsoft Visual Studio .NET\Vc7\include\xutility(98) :
error C2039: 'iterator_category' : is not a member of 'operator``global
namespace'''
C:\Program Files\Microsoft Visual Studio .NET\Vc7\include\xutility(98) :
fatal error C1507: previous user errors and subsequent error recovery halt
further compilation
ida.cpp
C:\Program Files\Microsoft Visual Studio .NET\Vc7\include\xutility(98) :
error C2825: '_Iter::iterator_category': cannot form a qualified name
C:\Program Files\Microsoft Visual Studio
..NET\Vc7\include\xutility(607) : see reference to class template
instantiation 'std::iterator_traits<_Iter>' being compiled
with
[
_Iter=const unsigned char *
]
ida.cpp(400) : see reference to class template instantiation
'std::reverse_iterator<_RanIt>' being compiled
with
[
_RanIt=const byte *
]
C:\Program Files\Microsoft Visual Studio .NET\Vc7\include\xutility(98) :
error C2039: 'iterator_category' : is not a member of 'operator``global
namespace'''
C:\Program Files\Microsoft Visual Studio .NET\Vc7\include\xutility(98) :
fatal error C1507: previous user errors and subsequent error recovery halt
further compilation
Generating Code...
---------------------- Done ----------------------
I looked up "error C2039" and Microsoft says that this error is known in VC
6 and 7 and was fixed in VC .NET 2003 (which I don't have) [KB 167730;
http://support.microsoft.com/default.aspx?scid=kb;EN-US;167730
<http://support.microsoft.com/default.aspx?scid=kb;EN-US;167730> ]. The
bug, however, seems to only be one of reporting the correct member function.
The fact that there is an actual compilation error in the source being
compiled is true (given the example in the knowledgebase article).
I have tried looking at the zdeflate.cpp and ida.cpp files that are causing
this problem, and then looking at the system include files xutility,
algorithm, and functional. I can't seem to figure out why VC is bitching
about using an unsigned int * or an unsigned char * as a template type.
This occurs when compiling it as both Debug and Release.
Interestingly, when I go to the cryptdll project and attempt to compile
that, I get the same as the above for zdeflate.cpp and ida.cpp, but I also
get:
------ Build started: Project: cryptdll, Configuration: Debug Win32 ------
Compiling...
pch.cpp
c:\Documents and Settings\umkauf\My Documents\Visual Studio
Projects\crypto521\simple.h(179) : fatal error C1001: INTERNAL COMPILER
ERROR
(compiler file 'msc1.cpp', line 2844)
Please choose the Technical Support command on the Visual C++
Help menu, or open the Technical Support help file for more
information
---------------------- Done ----------------------
Build: 0 succeeded, 3 failed, 0 skipped
I know the web page says that VC .NET 2002 is untested for Crypto++ 5.2.1,
but .. well, I guess I'm testing it. Can someone give me a patch or an idea
or something else to try to figure out how to make it compile?
I looked at the ChangeLog in the README file for 5.2.1, and it implies that
there were some windows-specific fixes made, so I'm wary of trying out 5.2.
Thanks,
-Mike