首页 | 乐园 | 淘宝店 | 社区 | 电驴 | 网页游戏 | 网址大全

VeryCD / 社区 / 电驴软件开发

资源管理小组

相关主题

主题: 求助:使用 Visual studio 2005 编译最新版电驴源代码出错,请各位帮忙

相关分类:

alaofangel (楼主) 2009/02/20 17:40:20 顶楼 举报

使用visual studio 2005(sp1)building easyMule_Libs.sln
错误提示如下:
integer.cpp
.\integer.cpp(86) : error C2244: 'CryptoPP::AlignedAllocator<T>::allocate' : unable to match function definition to an existing declaration
d:\programs\easymule\crypto51\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 *)'

大家有无遇到?

分享到开心网  分享到校内  收藏到QQ书签    订阅本主題RSS更新  美味书签

alaofangel (楼主) 2009/02/21 09:49:05 2楼 举报

没有人 遇到 相同 问题吗?
还是说一定要用 visual studio 2008 来build??


[0] [0] [回复]

f0rrest 2009/02/26 06:17:06 3楼 举报

没用过VS .net 2005,你把解决方案里的crypto51换成同目录下那个crypto55试试。

要么直接换VS .net 2003


[0] [0] [回复]

wyingquan 2009/05/28 17:19:29 4楼 举报

解决了:)原因是:
For the issue with cryptlib even though we have

template <class T>
class AlignedAllocator : public AllocatorBase<T>
{
public:
typedef typename AllocatorBase<T>::pointer pointer;
...
};

the compiler believes AllocatorBase<T>::pointer and AlignedAllocator<T>::pointer are different types when matching definitions and implementations.


[0] [0] [回复]

wyingquan 2009/05/28 17:19:44 5楼 举报

修改一下就可以了:
template <class T>
//CPP_TYPENAME AllocatorBase<T>::pointer AlignedAllocator<T>::allocate(size_type n, const void *)
CPP_TYPENAME AlignedAllocator<T>::pointer AlignedAllocator<T>::allocate(size_type n, const void *)

注掉的是原来的代码


[0] [0] [回复]

6楼已被删除


返回组首页

快速回复

(?) 附件上传

关于我们 | 诚聘英才 | 著作权声明 | 合作信息 | 广告事务
沪ICP备05001009号
©2003 - 2009 VeryCD.com Some Rights Reserved.