Official eMule-Board: Compiling Emule V0.50A With Vs2010 - Official eMule-Board

Jump to content


Page 1 of 1

Compiling Emule V0.50A With Vs2010

#1 User is offline   xausescu 

  • Newbie
  • Pip
  • Group: Members
  • Posts: 2
  • Joined: 09-June 15

Posted 18 June 2015 - 07:49 AM

Hi, I am a emule-fan from China.
I want to compile emule v0.50a source code with vs2010 ,I have compiled all libraries (include zlib,cximage,png,and so on). and I use /MT for release ,/MD for debug.
when I finally generate debug version of emule,it succeeded and worked very well.
but when I generate solution for a short release version,it had some errors as following lines:

错误 2539 error LNK2005: _free 已经在 libcmt.lib(free.obj) 中定义 D:\eMule0.50a-src\srchybrid\MSVCRT.lib(MSVCR100.dll)
错误 2540 error LNK2005: _strncpy 已经在 libcmt.lib(strncpy.obj) 中定义 D:\eMule0.50a-src\srchybrid\MSVCRT.lib(MSVCR100.dll)
错误 2541 error LNK2005: _strchr 已经在 libcmt.lib(strchr.obj) 中定义 D:\eMule0.50a-src\srchybrid\MSVCRT.lib(MSVCR100.dll)
错误 2542 error LNK2005: _malloc 已经在 libcmt.lib(malloc.obj) 中定义 D:\eMule0.50a-src\srchybrid\MSVCRT.lib(MSVCR100.dll)
错误 2543 error LNK2005: _printf 已经在 libcmt.lib(printf.obj) 中定义 D:\eMule0.50a-src\srchybrid\MSVCRT.lib(MSVCR100.dll)
错误 2544 error LNK2005: __snprintf 已经在 libcmt.lib(snprintf.obj) 中定义 D:\eMule0.50a-src\srchybrid\MSVCRT.lib(MSVCR100.dll)
错误 2545 error LNK2005: _strtoul 已经在 libcmt.lib(strtol.obj) 中定义 D:\eMule0.50a-src\srchybrid\MSVCRT.lib(MSVCR100.dll)
错误 2546 error LNK2005: _sscanf 已经在 libcmt.lib(sscanf.obj) 中定义 D:\eMule0.50a-src\srchybrid\MSVCRT.lib(MSVCR100.dll)
错误 2547 error LNK2005: _calloc 已经在 libcmt.lib(calloc.obj) 中定义 D:\eMule0.50a-src\srchybrid\MSVCRT.lib(MSVCR100.dll)
错误 2548 error LNK2005: _realloc 已经在 libcmt.lib(realloc.obj) 中定义 D:\eMule0.50a-src\srchybrid\MSVCRT.lib(MSVCR100.dll)
错误 2549 error LNK2005: _strstr 已经在 libcmt.lib(strstr.obj) 中定义 D:\eMule0.50a-src\srchybrid\MSVCRT.lib(MSVCR100.dll)
错误 2550 error LNK2005: "private: __thiscall type_info::type_info(class type_info const &)" (??0type_info@@AAE@ABV0@@Z) 已经在 libcmt.lib(typinfo.obj) 中定义 D:\eMule0.50a-src\srchybrid\MSVCRT.lib(ti_inst.obj)
错误 2551 error LNK2005: "private: class type_info & __thiscall type_info::operator=(class type_info const &)" (??4type_info@@AAEAAV0@ABV0@@Z) 已经在 libcmt.lib(typinfo.obj) 中定义 D:\eMule0.50a-src\srchybrid\MSVCRT.lib(ti_inst.obj)
错误 2553 error LNK1169: 找到一个或多个多重定义的符号 D:\eMule0.50a-src\srchybrid\Release_vc9\emule.exe

I google it on google and this forum,But I am really not good at using searching engine and not familiar with windows programming.
Really need your help!! Thanks a lot for some hints or guides.
Thank you.

This post has been edited by xausescu: 18 June 2015 - 07:50 AM

0

#2 User is offline   tHeWiZaRdOfDoS 

  • Man, what a bunch of jokers...
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 5630
  • Joined: 28-December 02

Posted 18 June 2015 - 12:14 PM

Seems like at least one of your input libs has been compiled with a wrong setting. IMHO it should be /MTd or /MT... would have to look it up.
Anyways, try adding /verbose:lib to the linker to see additional information.
0

#3 User is offline   xausescu 

  • Newbie
  • Pip
  • Group: Members
  • Posts: 2
  • Joined: 09-June 15

Posted 18 June 2015 - 02:27 PM

View PosttHeWiZaRdOfDoS, on 18 June 2015 - 08:14 PM, said:

Seems like at least one of your input libs has been compiled with a wrong setting. IMHO it should be /MTd or /MT... would have to look it up.
Anyways, try adding /verbose:lib to the linker to see additional information.


Seems that I met the same problem just as this link :http://forum.emule-p...showtopic=79071
and I add msvcrt.lib to ignore library in linker. VS displayed it's missing external __imp_memicmp error with miniupnpc library; then I recompiled it using miniupnpc.sln rather than miniupnpc_vc9.sln(converted to vc10 before),and finally it succeeds! :thumbup: :thumbup:
Thanks wizardofdos anyway. :clap:

This post has been edited by xausescu: 18 June 2015 - 02:28 PM

0

  • Member Options

Page 1 of 1

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users