为使更多的程序爱好者能更顺利的研究eMule代码,如代码编译不过的可在此跟贴,我们会尽量给于解决:)
注意事项:
1. 必须是VeryCD版的源码,其他mod的没有太多时间研究:)
(源码下载处: 最下方)
2. 请列出以下信息:
开发环境:
源码版本号:
编译出错的输出信息:
//////////////////////////////////////////////////////////////////////////////////////////
当前最新源代码(071112)编译问题及解决方案:
~~~~~~以下为vs2003会产生的错误:~~~~~~
==========================
>>>>>>>>>>> 出错信息:
c1xx : fatal error C1083: 无法打开源文件:“.\flashget\genhash\ThunderHash.cpp”: No such file or directory
c1xx : fatal error C1083: 无法打开源文件:“.\flashget\genhash\HashDataPgXY.cpp”: No such file or directory
c1xx : fatal error C1083: 无法打开源文件:“.\flashget\genhash\HashDataPackage.cpp”: No such file or directory
c1xx : fatal error C1083: 无法打开源文件:“.\flashget\genhash\FlashGetHash.cpp”: No such file or directory
c1xx : fatal error C1083: 无法打开源文件:“.\flashget\FlashGet.cpp”: No such file or directory
c1xx : fatal error C1083: 无法打开源文件:“.\flashget\genhash\ED2KHash.cpp”: No such file or directory
c1xx : fatal error C1083: 无法打开源文件:“.\flashget\genhash\BTHash.cpp”: No such file or directory
>>>>>>>>>>> 解决方案:
在工程中(vc的“解决方案资源管理器”那个页签)删除flashget文件夹
~~~~~~以下为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"
==========================
>>>>>>>>>>> 出错信息:
1>.\UPnpNat.cpp(706) : error C2440: '=' : cannot convert from 'const char *' to 'char *'
>>>>>>>>>>> 解决方案:
把此行改成
pDoubleNewLinePos = (char*) strstr(packet, STR_DOUBLE_NEWLINE);
==========================
>>>>>>>>>>> 出错信息:
1>.\EncryptedStreamSocket.cpp(361) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>.\EncryptedStreamSocket.cpp(492) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>.\EncryptedStreamSocket.cpp(590) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
>>>>>>>>>>> 解决方案:
把 const bySupportedEncryptionMethod
改成 const EEncryptionMethods bySupportedEncryptionMethod
(共3处)
==========================
>>>>>>>>>>> 出错信息:
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
==========================
>>>>>>>>>>> 出错信息:
链接时,跟lib相关的一些error。
>>>>>>>>>>> 解决方案:
用vs2005重编部分lib。由于目前的代码编起来比较麻烦,我编好了一份。
大家可以在这里下载,替换掉原来的就行了。
阅读(2893) | 评论(4) | 转发(0) |