Author Topic: aMule+DPL compile fault. [FIXED]  (Read 314 times)

0 Members and 1 Guest are viewing this topic.

wugi

  • Administrator
  • Newbie
  • *****
  • Posts: 44
aMule+DPL compile fault. [FIXED]
« on: August 04, 2010, 10:58:53 am »
最近在網路瀏覽網頁的時候發現amule-dlp這個東東, 可以防止一些吸血騾, 我也抓下來試試能不能在我的BCM4780 NAS上跑...不過編譯的時候出現了問題....

Code: [Select]
....
Compiling BaseClient.cpp
antiLeech.cpp: In member function ‘const wxChar* CantiLeech::DLPCheckNameAndHashAndMod(CString, CString&, CString&)’:
antiLeech.cpp:1207: error: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second:
/usr/include/wx-2.8/wx/string.h:1423: note: candidate 1: wxString operator+(wxChar, const wxString&)
CString_wx.h:20: note: candidate 2: CString operator+(const CString&, const CString&)
antiLeech.cpp:1207: error: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second:
/usr/include/wx-2.8/wx/string.h:1423: note: candidate 1: wxString operator+(wxChar, const wxString&)
CString_wx.h:20: note: candidate 2: CString operator+(const CString&, const CString&)
make[3]: *** [amule-BaseClient.o] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
« Last Edit: August 15, 2010, 01:04:21 am by wugi »

wugi

  • Administrator
  • Newbie
  • *****
  • Posts: 44
Re: aMule+DPL compile fault. [FIXED]
« Reply #1 on: August 15, 2010, 01:03:42 am »
Hoho, 找到解決方法了
修改 src/CString_wx.h

找尋
Code: [Select]
friend CString operator+(const CString& str1, const CString& str2){
替換成
Code: [Select]
friend CString operator+(const wxString(str1), const wxString(str2)){
之後再重新編譯後就可以完成編譯囉, 目前執行上沒什麼問題, 可以ban掉不少血騾...呵呵  ;D