emule编译 vs2005+win7+最新版本电驴

来源:互联网 发布:域名被攻击解决办法 编辑:程序博客网 时间:2024/04/29 18:35

基于这篇文章完成编译工作

http://blog.csdn.net/cecilulysess/article/details/4631458

下载最新版电驴

打开emule.sln,点击生成解决方案,编译开始

~~~~~~以下为vs2005会产生的错误:~~~~~~
==========================
>>>>>>>>>>> 出错信息:
1>d:\t\emule-VeryCD-src-071112_2005\src\CLientUDPSocket.h(20) : fatal error C1083: Cannot open include file: 'UPnp.h': No such file or directory
1>d:\t\eMule-VeryCD-src-071112_2005\src\ListenSocket.h(19) : fatal error C1083: Cannot open include file: 'UPnP.h': No such file or directory
>>>>>>>>>>> 解决方案:
删除CLientUDPSocket.h和ListenSocket.h 里的这一句: #include "UPnp.h"

 

==========================

>>>>>>>>>>> 出错信息:

Cannot open include file: 'ddraw.h': No such file or directory

解决方法,由于是vs2005 里面没有ddraw.h,需要安装DirectX SDK,下载个DX SDK Aug2007版本(一定要2007以前的~),后面的版本里就没有ddraw.h了。

安装完DX SDK后

       在vs2005中,点击tools->Options->VC Directories->Show directory for里选择include files   
添加     C:\DXSDK\Include (具体目录以实际安装目录为准)
tools->Options->VC Directories->Show directory for里选择library files   
添加     C:\DXSDK\Lib (具体目录以实际安装目录为准)

再次编译!!

报错

==========================

>>>>>>>>>>> 出错信息:

Cannot open include file: 'qedit.h': No such file or directory

 

我从google上面搜了一个qedit.h然后就拷到了vs2005的E:\Program Files\Microsoft Visual Studio 8\VC\include下面,去掉里面的一句话,把dxtrans.h注释掉,然后在#include <qedit.h>前面加上四句话

#define __IDxtCompositor_INTERFACE_DEFINED__

#define __IDxtAlphaSetter_INTERFACE_DEFINED__

#define __IDxtJpeg_INTERFACE_DEFINED__

#define __IDxtKey_INTERFACE_DEFINED__ 

 

之后每次编译会报各种缺少*.h的文件,直接google搜出来还放在这个目录下,直到没有报此类错误。中间还会有几次redefine,直接注释后来下载的文件里重复的部分

 

 

 

再编译!!

==========================
>>>>>>>>>>> 出错信息:
1>C:\Program Files\Microsoft Visual Studio 8\VC\include\wtime.inl(37) : error C2664: '_wctime32' : cannot convert parameter 1 from 'const time_t *' to 'const __time32_t *'
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
1>C:\Program Files\Microsoft Visual Studio 8\VC\include\wtime.inl(43) : error C2664: 'errno_t _wctime32_s(wchar_t *,size_t,const __time32_t *)' : cannot convert parameter 3 from 'const time_t *' to 'const __time32_t *'
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
1>C:\Program Files\Microsoft Visual Studio 8\VC\include\time.inl(32) : warning C4244: 'argument' : conversion from 'time_t' to '__time32_t', possible loss of data
1>C:\Program Files\Microsoft Visual Studio 8\VC\include\time.inl(32) : warning C4244: 'argument' : conversion from 'time_t' to '__time32_t', possible loss of data
1>C:\Program Files\Microsoft Visual Studio 8\VC\include\time.inl(38) : error C2664: '_ctime32' : cannot convert parameter 1 from 'const time_t *' to 'const __time32_t *'
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
1>C:\Program Files\Microsoft Visual Studio 8\VC\include\time.inl(44) : error C2664: 'errno_t _ctime32_s(char *,size_t,const __time32_t *)' : cannot convert parameter 3 from 'const time_t *' to 'const __time32_t *'
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
1>C:\Program Files\Microsoft Visual Studio 8\VC\include\time.inl(51) : error C2664: '_gmtime32' : cannot convert parameter 1 from 'const time_t *' to 'const __time32_t *'
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
1>C:\Program Files\Microsoft Visual Studio 8\VC\include\time.inl(57) : error C2664: '_gmtime32_s' : cannot convert parameter 2 from 'const time_t *' to 'const __time32_t *'
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
1>C:\Program Files\Microsoft Visual Studio 8\VC\include\time.inl(64) : error C2664: '_localtime32' : cannot convert parameter 1 from 'const time_t *' to 'const __time32_t *'
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
1>C:\Program Files\Microsoft Visual Studio 8\VC\include\time.inl(69) : error C2664: '_localtime32_s' : cannot convert parameter 2 from 'const time_t *' to 'const __time32_t *'
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
1>C:\Program Files\Microsoft Visual Studio 8\VC\include\time.inl(81) : error C2664: '_time32' : cannot convert parameter 1 from 'time_t *' to '__time32_t *'
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
>>>>>>>>>>> 解决方案:
去掉stdafx.h里的以下几行
#ifndef _USE_32BIT_TIME_T
#define _USE_32BIT_TIME_T
#endif

 

这应该是最后一次编译了,这次的错误是链接的时候出现问题。

这个问题网上的说法是只需要重新编译对于的库,在编译的过程中把它的character set设置成使用unicode即可,不过似乎crypto5.1按

照它官方网站的说明是无法在vs2008下编译的,而crypto5.6编译好了又无法链接,所以这里只能使用之前有朋友编译好的这些库了。

  各位可以从这里下载:http://download.VeryCD.com/emule071112_libsForVS2005.rar

覆盖掉对应的文件夹里面的文件~。ok,然后就生成了电驴~~~