aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Pages: [1] 2

Author Topic: Can't compile AmuleGUI SVN with WxMSW 2.8.0 (Windows port)  (Read 9689 times)

Menion

  • Jr. Member
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 95
  • Winter is coming...
Can't compile AmuleGUI SVN with WxMSW 2.8.0 (Windows port)
« on: December 21, 2006, 11:08:03 PM »

Hi I upgraded my MinGW32 env to WxMSW 2.8.0. I compiled WxMSW with:

./configure --enable-unicode --disable-shared --without-checklistbox

WxMSW compiled fine and I installed them. But when I tried to compile amule-cvs (21-12-2006 SVN) after a correct ./configure I have:

Quote
$ make
make  all-recursive
make[1]: Entering directory `/home/Menion/amule-cvs'
Making all in m4
make[2]: Entering directory `/home/Menion/amule-cvs/m4'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/Menion/amule-cvs/m4'
Making all in docs
make[2]: Entering directory `/home/Menion/amule-cvs/docs'
Making all in man
make[3]: Entering directory `/home/Menion/amule-cvs/docs/man'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/home/Menion/amule-cvs/docs/man'
make[3]: Entering directory `/home/Menion/amule-cvs/docs'
make[3]: Nothing to be done for `all-am'.
make[3]: Leaving directory `/home/Menion/amule-cvs/docs'
make[2]: Leaving directory `/home/Menion/amule-cvs/docs'
Making all in src
make[2]: Entering directory `/home/Menion/amule-cvs/src'
Making all in libs
make[3]: Entering directory `/home/Menion/amule-cvs/src/libs'
Making all in ec
make[4]: Entering directory `/home/Menion/amule-cvs/src/libs/ec'
make  all-am
make[5]: Entering directory `/home/Menion/amule-cvs/src/libs/ec'
make[5]: Nothing to be done for `all-am'.
make[5]: Leaving directory `/home/Menion/amule-cvs/src/libs/ec'
make[4]: Leaving directory `/home/Menion/amule-cvs/src/libs/ec'
Making all in common
make[4]: Entering directory `/home/Menion/amule-cvs/src/libs/common'
make[4]: Nothing to be done for `all'.
make[4]: Leaving directory `/home/Menion/amule-cvs/src/libs/common'
make[4]: Entering directory `/home/Menion/amule-cvs/src/libs'
make[4]: Nothing to be done for `all-am'.
make[4]: Leaving directory `/home/Menion/amule-cvs/src/libs'
make[3]: Leaving directory `/home/Menion/amule-cvs/src/libs'
Making all in utils
make[3]: Entering directory `/home/Menion/amule-cvs/src/utils'
Making all in xas
make[4]: Entering directory `/home/Menion/amule-cvs/src/utils/xas'
Making all in docs
make[5]: Entering directory `/home/Menion/amule-cvs/src/utils/xas/docs'
make[5]: Nothing to be done for `all'.
make[5]: Leaving directory `/home/Menion/amule-cvs/src/utils/xas/docs'
make[5]: Entering directory `/home/Menion/amule-cvs/src/utils/xas'
make[5]: Nothing to be done for `all-am'.
make[5]: Leaving directory `/home/Menion/amule-cvs/src/utils/xas'
make[4]: Leaving directory `/home/Menion/amule-cvs/src/utils/xas'
make[4]: Entering directory `/home/Menion/amule-cvs/src/utils'
make[4]: Nothing to be done for `all-am'.
make[4]: Leaving directory `/home/Menion/amule-cvs/src/utils'
make[3]: Leaving directory `/home/Menion/amule-cvs/src/utils'
Making all in pixmaps
make[3]: Entering directory `/home/Menion/amule-cvs/src/pixmaps'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/home/Menion/amule-cvs/src/pixmaps'
Making all in kademlia
make[3]: Entering directory `/home/Menion/amule-cvs/src/kademlia'
Making all in kademlia
make[4]: Entering directory `/home/Menion/amule-cvs/src/kademlia/kademlia'
make[4]: Nothing to be done for `all'.
make[4]: Leaving directory `/home/Menion/amule-cvs/src/kademlia/kademlia'
Making all in net
make[4]: Entering directory `/home/Menion/amule-cvs/src/kademlia/net'
make[4]: Nothing to be done for `all'.
make[4]: Leaving directory `/home/Menion/amule-cvs/src/kademlia/net'
Making all in routing
make[4]: Entering directory `/home/Menion/amule-cvs/src/kademlia/routing'
make[4]: Nothing to be done for `all'.
make[4]: Leaving directory `/home/Menion/amule-cvs/src/kademlia/routing'
Making all in utils
make[2]: Entering directory `/home/Menion/amule-cvs/src/utils'
Making all in xas
make[3]: Entering directory `/home/Menion/amule-cvs/src/utils/xas'
Making all in docs
make[4]: Entering directory `/home/Menion/amule-cvs/src/utils/xas/docs'
make[4]: Nothing to be done for `all'.
make[4]: Leaving directory `/home/Menion/amule-cvs/src/utils/xas/docs'
make[4]: Entering directory `/home/Menion/amule-cvs/src/utils/xas'
make[4]: Nothing to be done for `all-am'.
make[4]: Leaving directory `/home/Menion/amule-cvs/src/utils/xas'
make[3]: Leaving directory `/home/Menion/amule-cvs/src/utils/xas'
make[3]: Entering directory `/home/Menion/amule-cvs/src/utils'
make[3]: Nothing to be done for `all-am'.
make[3]: Leaving directory `/home/Menion/amule-cvs/src/utils'
make[2]: Leaving directory `/home/Menion/amule-cvs/src/utils'
Making all in pixmaps
make[2]: Entering directory `/home/Menion/amule-cvs/src/pixmaps'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/Menion/amule-cvs/src/pixmaps'
Making all in kademlia
make[2]: Entering directory `/home/Menion/amule-cvs/src/kademlia'
Making all in kademlia
make[3]: Entering directory `/home/Menion/amule-cvs/src/kademlia/kademlia'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/home/Menion/amule-cvs/src/kademlia/kademlia'
Making all in net
make[3]: Entering directory `/home/Menion/amule-cvs/src/kademlia/net'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/home/Menion/amule-cvs/src/kademlia/net'
Making all in routing
make[3]: Entering directory `/home/Menion/amule-cvs/src/kademlia/routing'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/home/Menion/amule-cvs/src/kademlia/routing'
Making all in utils
make[3]: Entering directory `/home/Menion/amule-cvs/src/kademlia/utils'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/home/Menion/amule-cvs/src/kademlia/utils'
make[3]: Entering directory `/home/Menion/amule-cvs/src/kademlia'
make[3]: Nothing to be done for `all-am'.
make[3]: Leaving directory `/home/Menion/amule-cvs/src/kademlia'
make[2]: Leaving directory `/home/Menion/amule-cvs/src/kademlia'
make[2]: Entering directory `/home/Menion/amule-cvs/src'
if g++ -DHAVE_CONFIG_H -I. -I. -I..    -I/usr/local/lib/wx/include/msw-unicode-release-static-2.8 -I/usr/local/include/wx-2.8 -D__WXMSW__ -mthreads -I./libs -DNOMINMAX -DUSE_EMBEDDED_CRYPTO -W -Wall -Wshadow -Wundef   -DUSE_WX_EXTENSIONS -MT libmuleappgui_a-BarShader.o -MD -MP -MF ".deps/libmuleappgui_a-BarShader.Tpo" -c -o libmuleappgui_a-BarShader.o `test -f 'BarShader.cpp' || echo './'`BarShader.cpp; \
then mv -f ".deps/libmuleappgui_a-BarShader.Tpo" ".deps/libmuleappgui_a-BarShader.Po"; else rm -f ".deps/libmuleappgui_a-BarShader.Tpo"; exit 1; fi
In file included from C:/msys/1.0/local/include/wx-2.8/wx/msw/gdiimage.h:20,
                 from C:/msys/1.0/local/include/wx-2.8/wx/msw/cursor.h:15,
                 from C:/msys/1.0/local/include/wx-2.8/wx/cursor.h:20,
                 from C:/msys/1.0/local/include/wx-2.8/wx/dc.h:22,
                 from BarShader.cpp:26:
C:/msys/1.0/local/include/wx-2.8/wx/gdicmn.h: In member function `bool wxRect::Inside(int, int) const':
C:/msys/1.0/local/include/wx-2.8/wx/gdicmn.h:486: warning: declaration of 'y' shadows a member of 'this'
C:/msys/1.0/local/include/wx-2.8/wx/gdicmn.h:486: warning: declaration of 'x' shadows a member of 'this'
In file included from BarShader.cpp:27:
Color.h: At global scope:
Color.h:74: error: `COLORREF' does not name a type
In file included from BarShader.cpp:27:
Color.h:94: error: `WxColourFromCr' declared as an `inline' variable
Color.h:94: error: `COLORREF' was not declared in this scope
Color.h:95: error: expected `,' or `;' before '{' token
Color.h:100: error: `COLORREF' does not name a type
BarShader.cpp: In member function `void CBarShader::FillRect(wxDC*, const wxRect&, uint32, bool)':
BarShader.cpp:255: error: no match for call to `(wxColour) (uint32&)'
make[2]: *** [libmuleappgui_a-BarShader.o] Error 1
make[2]: Leaving directory `/home/Menion/amule-cvs/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/Menion/amule-cvs/src'
make: *** [all-recursive] Error 1

Before, with WxMSW 2.6.3 I was able to compile amuleGUI correctly. Bye!
Logged

Aethereal

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 35
Re: Can't compile AmuleGUI SVN with WxMSW 2.8.0 (Windows port)
« Reply #1 on: December 22, 2006, 08:25:21 AM »

Same config and same problem here....
Logged

Kry

  • Ex-developer
  • Retired admin
  • Hero Member
  • *****
  • Karma: -665
  • Offline Offline
  • Posts: 5795
Re: Can't compile AmuleGUI SVN with WxMSW 2.8.0 (Windows port)
« Reply #2 on: December 22, 2006, 06:58:13 PM »

I'll put a patch up soon. Probably this weekend.
Logged

Menion

  • Jr. Member
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 95
  • Winter is coming...
Re: Can't compile AmuleGUI SVN with WxMSW 2.8.0 (Windows port)
« Reply #3 on: December 28, 2006, 11:33:54 PM »

Any news about this compilation problem?
Logged

Kry

  • Ex-developer
  • Retired admin
  • Hero Member
  • *****
  • Karma: -665
  • Offline Offline
  • Posts: 5795
Re: Can't compile AmuleGUI SVN with WxMSW 2.8.0 (Windows port)
« Reply #4 on: December 29, 2006, 03:46:15 AM »

Yes. I didn't do it yet.
Logged

Menion

  • Jr. Member
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 95
  • Winter is coming...
Re: Can't compile AmuleGUI SVN with WxMSW 2.8.0 (Windows port)
« Reply #5 on: April 14, 2007, 09:54:18 AM »

In file included from BarShader.cpp:27:
Color.h: In function `COLORREF DarkenColour(COLORREF, int)':
Color.h:78: error: `GetRValue' undeclared (first use this function)
Color.h:78: error: (Each undeclared identifier is reported only once for each function it appears in.)
Color.h:78: error: `GetGValue' undeclared (first use this function)
Color.h:78: error: `GetBValue' undeclared (first use this function)
Color.h:78: error: `RGB' undeclared (first use this function)
In file included from BarShader.cpp:27:
Color.h: In function `wxColour WxColourFromCr(COLORREF)':
Color.h:98: error: `GetRValue' undeclared (first use this function)
Color.h:98: error: `GetGValue' undeclared (first use this function)
Color.h:98: error: `GetBValue' undeclared (first use this function)
Color.h: In function `COLORREF CrFromWxColour(wxColour)':
Color.h:104: error: `RGB' undeclared (first use this function)
make[3]: *** [libmuleappgui_a-BarShader.o] Error 1
make[3]: Leaving directory `/home/Menion/amule-cvs/src'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/Menion/amule-cvs/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/Menion/amule-cvs'
make: *** [all] Error 2

Still unable to compile under Win32. Please don't forget windows user :(
Logged

Nodsu

  • Jr. Member
  • **
  • Karma: 3
  • Offline Offline
  • Posts: 62
Re: Can't compile AmuleGUI SVN with WxMSW 2.8.0 (Windows port)
« Reply #6 on: April 14, 2007, 10:12:01 AM »

Hmm.. Did you try the latest SVN? Maybe they still haven't fixed it in the sources..

To get around this problem, edit the src/color.h file and put "include <Types.h>" after the #define COLOR_H line so it looks like this:
Code: [Select]
#ifndef COLOR_H
#define COLOR_H

#include <Types.h>

#if !defined(__WXPM__) && !defined(__WXMSW__)  // Otherwise already defined in wx/defs.h.
#include <inttypes.h>   // Do_not_auto_remove (old gcc)
I have a feeling that you will hit another issue after fixing this one.. (I did.) Post back that error so the developers would have something sticking in their face :)
Logged

Menion

  • Jr. Member
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 95
  • Winter is coming...
Re: Can't compile AmuleGUI SVN with WxMSW 2.8.0 (Windows port)
« Reply #7 on: April 14, 2007, 10:19:15 AM »

I tried the latest SVN source (aMule-CVS-20070414.tar.bz2). Compiling with WxWidgets 2.6.3 is ok.
« Last Edit: April 14, 2007, 10:21:31 AM by Menion »
Logged

phoenix

  • Evil respawning bird from aMule Dev Team
  • Developer
  • Hero Member
  • *****
  • Karma: 44
  • Offline Offline
  • Posts: 2503
  • The last shadow you'll ever see
Re: Can't compile AmuleGUI SVN with WxMSW 2.8.0 (Windows port)
« Reply #8 on: April 14, 2007, 03:21:11 PM »

I did the following:

Code: [Select]
#ifndef COLOR_H
#define COLOR_H


#if !defined(__WXPM__) && !defined(__WXMSW__)  // Otherwise already defined in wx/defs.h.
#include <inttypes.h> // Do_not_auto_remove (old gcc)
typedef uint32_t COLORREF;
#else
#include "Types.h" // Do_not_auto_remove (Needed for windows compilation)
typedef unsigned long COLORREF;
#endif

This will be on tomorrow cvs tarball. Tell me how it compiles now.

Thanks for your support!
Logged

wuischke

  • Developer
  • Hero Member
  • *****
  • Karma: 183
  • Offline Offline
  • Posts: 4292
Re: Can't compile AmuleGUI SVN with WxMSW 2.8.0 (Windows port)
« Reply #9 on: April 15, 2007, 09:43:07 AM »

Win32 compile stops at PartFileConvert.cpp, I'll have a look at the code.

Quote
if g++ -DHAVE_CONFIG_H -I. -I. -I..   -I/usr/local/include  -I/usr/local/lib/wx/include/msw-unicode-release-static-2.8 -I/usr/local/include/wx-2.8 -__WXMSW__ -mthreads  -I./libs -Ilibs -DAMULE_INSTALL_PREFIX="\"/usr/local\"" -DAMULE_LOCALEDIR="\"/usr/local/share/locale\"" -DNOMINMAX -DUSE_EMBEDDED_CRYPTO -W -Wall -Wshadow -Wundef -O2  -DUSE_WX_EXTENSIONS -MT amule-PartFileConvert.o -MD -MP -MF ".deps/amule-PartFileConvert.Tpo" -c -o amule-PartFileConvert.o `test -f 'PartFileConvert.cpp' || echo './'`PartFileConvert.cpp; \
then mv -f ".deps/amule-PartFileConvert.Tpo" ".deps/amule-PartFileConvert.Po"; else rm -f ".deps/amule-PartFileConvert.Tpo"; exit 1; fi
In file included from CFile.h:29,
                 from PartFile.h:31,
                 from PartFileConvert.cpp:50:
SafeFile.h:201:2: warning: #warning DOCS
PartFileConvert.cpp: In static member function `static void CPartFileConvert::ConvertToeMule(wxString, bool)':
PartFileConvert.cpp:140: error: 'class CPartFileConvertDlg' has no member named 'AddJobW'
PartFileConvert.cpp: In static member function `static void CPartFileConvert::ShowGUI(wxWindow*)':
PartFileConvert.cpp:562: error: 'class CPartFileConvertDlg' has no member named 'AddJobW'
PartFileConvert.cpp: At global scope:
PartFileConvert.cpp:766: error: no `void CPartFileConvertDlg::AddJobW(ConvertJob*)' member function declared in class `CPartFileConvertDlg'
make[3]: *** [amule-PartFileConvert.o] Error 1

Edit: OK, way behind my logic. The method name is in both - the source file and the header file - "AddJob", but the name is changed to AddJobW while compiling. I tried to define a new wrapper function AddJobW, but it complains about overloading the function "AddJobW", although one is named "AddJob" and my function only is named "AddJobW".

Code example:
Code: [Select]
void CPartFileConvertDlg::AddJobW(ConvertJob* job)
{
AddJob(job);
}

void CPartFileConvertDlg::AddJob(ConvertJob* job)
{
long ix = m_joblist->InsertItem(m_joblist->GetItemCount(), job->folder);
if (ix != -1) {
m_joblist->SetItemData(ix, (long)job);
m_joblist->SetItem(ix, 1, CPartFileConvert::GetReturncodeText(job->state));
}
}
g++ error:
Quote
PartFileConvert.cpp:64: error: redefinition of `void CPartFileConvertDlg::AddJobW(ConvertJob*)'
PartFileConvert.cpp:59: error: `void CPartFileConvertDlg::AddJobW(ConvertJob*)' previously defined here


gcc-bug?
Code: [Select]
$ g++ -v
Reading specs from c:/devel/mingw/bin/../lib/gcc/mingw32/3.4.2/specs
Configured with: ../gcc/configure --with-gcc --with-gnu-ld --with-gnu-as --host=mingw32 --target=mingw32 --prefix=/mingw --enable-threads --disable-nls --enable-languages=c,c++,f77,ada,objc,java --disable-win32-registry --disable-shared --enable-sjlj-exceptions --enable-libgcj --disable-java-awt --without-x --enable-java-gc=boehm --disable-libgcj-debug --enable-interpreter --enable-hash-synchronization --enable-libstdcxx-debug
Thread model: win32
gcc version 3.4.2 (mingw-special)
« Last Edit: April 15, 2007, 09:56:58 AM by wuischke »
Logged

phoenix

  • Evil respawning bird from aMule Dev Team
  • Developer
  • Hero Member
  • *****
  • Karma: 44
  • Offline Offline
  • Posts: 2503
  • The last shadow you'll ever see
Re: Can't compile AmuleGUI SVN with WxMSW 2.8.0 (Windows port)
« Reply #10 on: April 15, 2007, 01:03:45 PM »

Hum, really very strange...

IIRC, there is gcc 3.4.5, maybe you could try with that one. But I think that the problem is something else.
Logged

wuischke

  • Developer
  • Hero Member
  • *****
  • Karma: 183
  • Offline Offline
  • Posts: 4292
Re: Can't compile AmuleGUI SVN with WxMSW 2.8.0 (Windows port)
« Reply #11 on: April 15, 2007, 02:21:05 PM »

Same with 3.4.5.
Logged

Nodsu

  • Jr. Member
  • **
  • Karma: 3
  • Offline Offline
  • Posts: 62
Re: Can't compile AmuleGUI SVN with WxMSW 2.8.0 (Windows port)
« Reply #12 on: April 15, 2007, 04:56:48 PM »

The *W and *A functions should be generated automatically.. Windows uses the W version for unicode, A version for older ANSI programs.

Today's SVN compiles just fine here (GCC 3.4.2, wxMSW 2.8.3) once I get around the
Quote
if g++ -DHAVE_CONFIG_H -I. -I. -I..    -I/usr/local/lib/wx/include/msw-unicode-release-static-2.8 -I/usr/local/include/wx-2.8 -D__WXMSW__ -mthreads  -I./libs -Ilibs -DAMULE_INSTALL_PREFIX="\"/usr/local\"" -DAMULE_LOCALEDIR="\"/usr/local/share/locale\"" -DCLIENT_GUI -DEC_REMOTE -DNOMINMAX -DUSE_EMBEDDED_CRYPTO -W -Wall -Wshadow -Wundef -O2  -DUSE_WX_EXTENSIONS -MT amulegui-TransferWnd.o -MD -MP -MF ".deps/amulegui-TransferWnd.Tpo" -c -o amulegui-TransferWnd.o `test -f 'TransferWnd.cpp' || echo './'`TransferWnd.cpp; \
then mv -f ".deps/amulegui-TransferWnd.Tpo" ".deps/amulegui-TransferWnd.Po"; else rm -f ".deps/amulegui-TransferWnd.Tpo"; exit 1; fi
In file included from C:/msys/1.0/local/include/wx-2.8/wx/toplevel.h:317,
                 from C:/msys/1.0/local/include/wx-2.8/wx/frame.h:19,
                 from amuleDlg.h:30,
                 from TransferWnd.cpp:32:
C:/msys/1.0/local/include/wx-2.8/wx/msw/toplevel.h:122: error: expected identifier before numeric constant
C:/msys/1.0/local/include/wx-2.8/wx/msw/toplevel.h:122: error: expected `,' or `...' before numeric constant
C:/msys/1.0/local/include/wx-2.8/wx/msw/toplevel.h:122: error: ISO C++ forbids declaration of `parameter' with no type
In file included from KnownFile.h:37,
                 from PartFile.h:30,
                 from TransferWnd.cpp:33:
./libs/ec/cpp/ECSpecialTags.h:28:2: warning: #warning Kry - Preferences packet derived from packet, and that's ok, but shouldn't be here because this is a tag file and forces a stupid include
In file included from CFile.h:29,
                 from PartFile.h:31,
                 from TransferWnd.cpp:33:
SafeFile.h:201:2: warning: #warning DOCS
In file included from amule-remote-gui.h:29,
                 from amule.h:349,
                 from TransferWnd.cpp:38:
./libs/ec/cpp/RemoteConnect.h:45:2: warning: #warning Kry TODO - move to abstract layer.
make[3]: *** [amulegui-TransferWnd.o] Error 1
make[3]: Leaving directory `/src/amule-cvs/src'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/src/amule-cvs/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/src/amule-cvs'

Edit by Wuischke: Removed gaps and changed to quote tags for proper line break.
« Last Edit: April 15, 2007, 08:20:18 PM by wuischke »
Logged

phoenix

  • Evil respawning bird from aMule Dev Team
  • Developer
  • Hero Member
  • *****
  • Karma: 44
  • Offline Offline
  • Posts: 2503
  • The last shadow you'll ever see
Re: Can't compile AmuleGUI SVN with WxMSW 2.8.0 (Windows port)
« Reply #13 on: April 15, 2007, 09:04:39 PM »

Makes no sense to me, that would mean that wx headers are broken for msw, I don't think this is the case.

Nodsu, how did you get around this, can you post a patch?
Logged

Nodsu

  • Jr. Member
  • **
  • Karma: 3
  • Offline Offline
  • Posts: 62
Re: Can't compile AmuleGUI SVN with WxMSW 2.8.0 (Windows port)
« Reply #14 on: April 16, 2007, 07:38:14 PM »

I just used the dirtiest trick in the book.. I commented out the faulting function declaration :)

I don't think this as a patch would make it to any kind of releases :p
Logged
Pages: [1] 2