aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Author Topic: Error using wxWidgets 2.8.0  (Read 3690 times)

NiKo87

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 49
Error using wxWidgets 2.8.0
« on: December 18, 2006, 01:17:30 PM »

Hi, I'm trying to compile aMule 2.1.3 with the patch on the homepage using the wxWidgets 2.8.0 but I get this error:

echo './'`MuleTrayIcon.cpp; \
then mv -f ".deps/amule-MuleTrayIcon.Tpo" ".deps/amule-MuleTrayIcon.Po"; else rm -f ".deps/amule-MuleTrayIcon.Tpo"; exit 1; fi
/Users/MaMaK/Desktop/wxWidgets-2.8.0/include/wx/gdicmn.h: In member function 'bool wxRect::Inside(int, int) const':
/Users/MaMaK/Desktop/wxWidgets-2.8.0/include/wx/gdicmn.h:486: warning: declaration of 'y' shadows a member of 'this'
/Users/MaMaK/Desktop/wxWidgets-2.8.0/include/wx/gdicmn.h:486: warning: declaration of 'x' shadows a member of 'this'
MuleTrayIcon.cpp: In member function 'void CMuleTrayIcon::SetTrayIcon(int, uint32)':
MuleTrayIcon.cpp:258: error: no matching function for call to 'wxMemoryDC::SelectObject(wxIcon&)'
/Users/MaMaK/Desktop/wxWidgets-2.8.0/include/wx/dcmemory.h:30: note: candidates are: void wxMemoryDCBase::SelectObject(wxBitmap&)
make[3]: *** [amule-MuleTrayIcon.o] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

I'm using Mac OS X 10.4.8 with the latest version of XCode.
Logged

lionel77

  • Provider of Mac builds, Forum Mod
  • Hero Member
  • *****
  • Karma: 4
  • Offline Offline
  • Posts: 1107
  • Mac OS X 10.4 (Power Mac G5)
Re: Error using wxWidgets 2.8.0
« Reply #1 on: December 18, 2006, 05:53:07 PM »

You are not the first one to run into this problem. ;)

It's fixed in current aMule CVS code but if you really want to compile 2.1.3 against wx 2.8.0, you need to open MuleTrayIcon.cpp and at line 258 and change:
IconWithSpeed.SelectObject(CurrentIcon);
to
IconWithSpeed.DrawIcon(CurrentIcon, 0, 0);

One word of caution though, when you compile aMule against a recent version of wx (e.g., 2.8.0) then there will be most likely two bugs:
- the labels & icons in the preferences will be associated with the wrong categories
- none of the graphs are drawn (e.g., on the statistics page)

If you want, you can try to help me bug people enough so that those two issues get fixed. ;)
/me waves at phoenix
Logged
Current aMule CVS builds for OS X can be found here.

NiKo87

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 49
Re: Error using wxWidgets 2.8.0
« Reply #2 on: December 18, 2006, 08:27:51 PM »

Thanks, now it works! ;)
Logged

NiKo87

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 49
Re: Error using wxWidgets 2.8.0
« Reply #3 on: December 18, 2006, 10:24:30 PM »

If I compile the wxWidgets using --enable-universal_binary I get this error:

/usr/bin/ld: warning libs/common/libmulecommon.a archive's cputype (7, architecture i386) does not match cputype (18) for specified -arch flag: ppc (can't load from it)
/usr/bin/ld: warning libs/ec/libec.a archive's cputype (7, architecture i386) does not match cputype (18) for specified -arch flag: ppc (can't load from it)
/usr/bin/ld: warning ./libmuleappcore.a archive's cputype (7, architecture i386) does not match cputype (18) for specified -arch flag: ppc (can't load from it)
/usr/bin/ld: warning ./libmuleappgui.a archive's cputype (7, architecture i386) does not match cputype (18) for specified -arch flag: ppc (can't load from it)
/usr/bin/ld: Undefined symbols:
_main
collect2: ld returned 1 exit status
lipo: can't open input file: /var/tmp//ccp5hBen.out (No such file or directory)
make[3]: *** [amule] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

Is it normal?
Logged

lionel77

  • Provider of Mac builds, Forum Mod
  • Hero Member
  • *****
  • Karma: 4
  • Offline Offline
  • Posts: 1107
  • Mac OS X 10.4 (Power Mac G5)
Re: Error using wxWidgets 2.8.0
« Reply #4 on: December 19, 2006, 05:59:54 AM »

Yeah, aMule is still a pain in the ass to compile as Universal Binary. Do you really need a universal version or were you just playing with that --enable-universal-binary switch?
Logged
Current aMule CVS builds for OS X can be found here.

NiKo87

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 49
Re: Error using wxWidgets 2.8.0
« Reply #5 on: December 19, 2006, 10:17:49 AM »

I would like to compile a universal binary version on my MacBook to use it on my iMacG5. But it's not a problem if it doesn't work. I'll compile amule directly on my iMac. Thanks ;)
Logged

lionel77

  • Provider of Mac builds, Forum Mod
  • Hero Member
  • *****
  • Karma: 4
  • Offline Offline
  • Posts: 1107
  • Mac OS X 10.4 (Power Mac G5)
Re: Error using wxWidgets 2.8.0
« Reply #6 on: December 19, 2006, 03:01:13 PM »

Actually, I just remembered that I already posted some basic instruction for compiling aMule as Universal Binary here. Please let me know if you need any additional help.
Logged
Current aMule CVS builds for OS X can be found here.