Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/cplusplus/139.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C++ 编译旧版本的Crypto++;,md5.h和模板的问题_C++_Templates_Inheritance_Crypto++ - Fatal编程技术网

C++ 编译旧版本的Crypto++;,md5.h和模板的问题

C++ 编译旧版本的Crypto++;,md5.h和模板的问题,c++,templates,inheritance,crypto++,C++,Templates,Inheritance,Crypto++,我正在开发一个遗留软件,在Debian stable上使用GCC4.7进行构建(出于某种原因,目前还需要libstdc++53.2),目前g++挂在crypto++的md5.h上 我的C++技能生疏了,我已经盯着它看了好几天了。有人对我如何解决这个问题有什么想法吗 我使用的cryto++版本的完整源代码: 错误: compiling md5.cpp (g++) compiling md5.cpp (g++) In file included from md5.cpp:5:0: md5.h:10

我正在开发一个遗留软件,在Debian stable上使用GCC4.7进行构建(出于某种原因,目前还需要libstdc++53.2),目前g++挂在crypto++的md5.h上

我的C++技能生疏了,我已经盯着它看了好几天了。有人对我如何解决这个问题有什么想法吗

我使用的cryto++版本的完整源代码:

错误:

compiling md5.cpp (g++)
compiling md5.cpp (g++)
In file included from md5.cpp:5:0:
md5.h:10:32: error: expected template-name before '<' token
md5.h:10:32: error: expected '{' before '<' token
md5.h:10:32: error: expected unqualified-id before '<' token
md5.cpp:109:1: error: expected '}' at end of input
编译md5.cpp(g++) 编译md5.cpp(g++) 在md5.cpp:5:0中包含的文件中:
md5.h:10:32:错误:在“IteratedHash的定义是什么?好问题-我相信它是在iterhash.h中定义的,但还没有在那里或其他地方找到它。我在上面添加了一个链接,指向我正在使用的完整源代码。我有——这就是我的前任给我的所有东西,而不必在crypto++成功后公开利用构建库的包装器。请参阅链接的filedropper zip,它包含我正在使用的所有crypto++源代码。请不要删除任何文件
#ifndef CRYPTOPP_MD5_H
#define CRYPTOPP_MD5_H

#include "iterhash.h"

NAMESPACE_BEGIN(CryptoPP)

/// <a href="http://www.weidai.com/scan-mirror/md.html#MD5">MD5</a>
/** 128 Bit Hash */
class MD5 : public IteratedHash<word32, false, 64>
{
public:
     enum {DIGESTSIZE = 16};
     MD5() : IteratedHash<word32, false, 64>(DIGESTSIZE) {Init();}
     static void Transform(word32 *digest, const word32 *data);

protected:
    void Init();
    void vTransform(const word32 *data) {Transform(digest, data);}
};

NAMESPACE_END

#endif