aMule Forum

English => Multiplatform => Win32 => Topic started by: Jacobo221 on May 31, 2004, 04:18:54 AM

Title: HowTo compile aMule on Windows
Post by: Jacobo221 on May 31, 2004, 04:18:54 AM
The HowTo on how to compile aMule on Windows platforms is now on WIki at http://wiki.amule.org/index.php/HowTo_compile_on_Win32

It's just the same as the document in sources, but in rich format.

Thank Madcat for that HowTo, he wrote it ;-)

Edit: this HowTo applies to compilation with MingW. If you want to compile aMule with Visual Studio (the free Express Edition is sufficient) look at http://wiki.amule.org/index.php/HowTo_compile_with_Visual_Studio.
Title: Re: HowTo compile aMule on Windows
Post by: thepolish on July 17, 2004, 10:29:26 PM
Isn't it beautifull ?

The polish
Title: Re: HowTo compile aMule on Windows
Post by: Kry on July 18, 2004, 12:49:02 AM
Is not beautiful! it's Windows!
Title: Re: HowTo compile aMule on Windows
Post by: deltaHF on July 18, 2004, 01:21:55 AM
:D
Title: Re: HowTo compile aMule on Windows
Post by: CellarDoor on August 01, 2004, 12:34:43 PM
But nice to know that aMule is so goooooood
that it even runs on such
non-beautiful Systems ;)  :D :P :rolleyes:
Title: Re: HowTo compile aMule on Windows
Post by: soma on January 14, 2005, 04:18:51 AM
Hi all

I've been trying to compile aMule using those tips, but I'm affraid I'm in a dead end.

I don't know jack about Linux, so I don't have the smallest idea how to link, add whatever statically or what the libraries to MinGWStudio, :(

Could you,  :baby:  :baby: please, make an easier HowTo Compile in Win32, for people like me, that only know things like "unzip this...", "copy paste that...", write this on the msys console...", etc... (  :D )  

Or, maybe, write a step by step procedure, here in the forum, if it's not much to ask,  :]

Thanks in advance...Keep up the good work

P.S.: Pls, forgive me if the post isn't on the right place.
Title: Re: HowTo compile aMule on Windows
Post by: thepolish on January 14, 2005, 10:51:37 AM
Hi,

For now, it is not very easy to do it under win32, so need so more hack than "copy past". Since win32 version is not planned for 2.0.0 (only mac is) , win32 is since under heavy development.

So win32 compilation is reserved for people who want to spend hours on it :) Obscur wiki is a sort of selection :)

But, i promiss, as soon as win32 version is ok, i will update the wiki :)

Quickly, the easiest way to try is to open amule.msp under mingwstudio, then verify that the files to compile are the same as in the Makefile in "amule:" section (not sure all is up to date), then press F7 and watch the error msg  :)

Thepolish
Title: Re: HowTo compile aMule on Windows
Post by: soma on January 14, 2005, 03:37:31 PM
Thanks for the quick and promptly answer, :)

I'm going to try, once more, using MinGWStudio and see what happens.

I'll keep you guys posted, if that's ok!

Cya
Title: Re: HowTo compile aMule on Windows
Post by: drizzt on January 16, 2005, 07:31:22 PM
actually is amule 100% compatible with Windows OS?
Title: Re: HowTo compile aMule on Windows
Post by: antenon on February 07, 2005, 11:11:36 PM
hello all
I'm trying to make amule last version on windows to include some adds to de code.
I installed mingwstudio2.05, the easyest way, that suposed to contain wx's libraries, but when opening the .mpl file and compiling I found the following error:

--------------------Configuration: amule - Release--------------------
Compiling source file(s)...
CFile.cpp
src\CFile.cpp:606: error: no  `wxString
CDirIterator::FindFirstFileA(CDirIterator::FileType, wxString)' member
function declared in class `CDirIterator'
C:\MinGWStudio\MinGW\include\winbase.h: In member function `wxString
CDirIterator::FindFirstFileA(CDirIterator::FileType, wxString)':
C:\MinGWStudio\MinGW\include\winbase.h:1140: error: too few arguments to
function `BOOL FindNextFileA(void*, _WIN32_FIND_DATAA*)'
src\CFile.cpp:613: error: at this point in file
C:\MinGWStudio\Include\wx\string.h:284: error: `wxString::wxString(int)' is
private
src\CFile.cpp:613: error: within this context
src\CFile.cpp: At global scope:
src\CFile.cpp:616: error: no `wxString CDirIterator::FindNextFileA()' member
function declared in class `CDirIterator'
src\CFile.cpp: In member function `wxString CDirIterator::FindNextFileA()':
src\CFile.cpp:636: error: 'struct dirent' has no member named 'd_type'
src\CFile.cpp:637: error: `DT_DIR' undeclared (first use this function)
src\CFile.cpp:637: error: (Each undeclared identifier is reported only once for
each function it appears in.)
src\CFile.cpp:644: error: `DT_REG' undeclared (first use this function)

amule.exe - 10 error(s), 0 warning(s)
 :(

I found this at the begining of CFile.cpp:

// wxWindows
#ifndef WX_PRECOMP
#   include
#   include
#   include
#endif // !WX_PRECOMP

In the header wx/string.h is suposed to be the class wxString not found while compiling, but I tryed to define WX_PRECOMP by hand and nothing


might be that this version of mingwstudio does not include the correct version of wx libraries? Can anybody help me?

 thanks  :baby: :rolleyes:
Title: Re: HowTo compile aMule on Windows
Post by: Kry on February 07, 2005, 11:34:15 PM
I messed up the names because of some macros. If you come to #amule and look for me we could fix this together
Title: Re: HowTo compile aMule on Windows
Post by: antenon on February 11, 2005, 06:07:24 PM
8o
I was confused

--------------------Configuration: amule - Release--------------------
Compiling source file(s)...
CFile.cpp
src\CFile.cpp:659: error: no `wxString
CDirIterator::FindFirstFileA(CDirIterator::FileType, wxString)' member
function declared in class `CDirIterator'
......

I realized that the symbol that didnt found when compilation was not "wxString"  but really the whole 'wxString CDirIterator::FindFirstFileA(CDirIterator::FileType, wxString)" It is suposed that it would be implemented somewhere.
It is a function that must be defined in the class of the header file CFile.h, buy I didnot found here

I made a global search all over the files for 'FindFirstFileA'  but nothing found

¿any ideas?
Title: Re: HowTo compile aMule on Windows
Post by: antenon on February 13, 2005, 09:50:32 PM
I have resolved previous problems.  thanks to Kry in the irc.

I continue compiling. Now the problem is:

Compiling...
SearchListCtrl.cpp
In file included from src\SearchListCtrl.h:31,
from src\SearchListCtrl.cpp:26:
src\MuleListCtrl.h:61: error: syntax error before `{' token

I am confused. The syntax error is in the file MuleListCtrl.h but MuleListCtrl.cpp compiles perfectly.  :(

I dig the problem. The lines that gives the error are:

.....
#ifdef __WXMSW__
   #include
   class CMuleListCtrl : public wxListCtrl
#else
   #include "listctrl_gen.h"
   class CMuleListCtrl : public wxODListCtrl
#endif

{
public:

   /**
.....

The symbol __WXMSW__ is defined so that code is the some that:
......
#include
class CMuleListCtrl : public wxListCtrl
{

.......

I made test of replazing the first code with the previous one. Nothing new.

so the problem is that wxListCtrl is not recogniced. I made another test of replacing "wxListCtrl" to "wxListCtrlfoo" and continues the some error while compiling.

I inspect file "SearchListCtrl.cpp". The first included file is the header file of the class :
#include "SearchListCtrl.h"
Then I inspect SeachListCtrl.h, I found that the first in this file is:

#include             // Needed for std::list

#include "MuleListCtrl.h"   // Needed for CMuleListCtrl

I tryed comenting the first include: //#include
but keep failing compilation.

¿any Ideas? ?(

If I finally sucess compilation I will write the step by step guide.
Title: Re: HowTo compile aMule on Windows
Post by: Kry on February 13, 2005, 11:25:10 PM
#include ?
Title: Re: HowTo compile aMule on Windows
Post by: antenon on February 14, 2005, 04:31:15 PM
the class file header of MuleListCtrl class (MuleListCtrl.h) is included by several other classes:

CatDialog.cpp----->includes MuleListCtrl.h compilation OK
ChatWnd.cpp----> OK
DownloadListCtrl.cpp--> OK
FileDetailDialog.cpp--> OK
FileDetailListCtrl.cpp--> OK
FriendListCtrl.cpp--> OK
MuleListCtrl.cpp--> OK
SearchList.cpp---->FAILED

I suspect there is something diferent in SearchList.cpp that make to fail when including MuleListCtrl.h , but what?
Title: Re: HowTo compile aMule on Windows
Post by: Kry on February 14, 2005, 04:53:26 PM
Did you try what I said?
Title: Re: HowTo compile aMule on Windows
Post by: antenon on February 14, 2005, 05:29:13 PM
yes,

#include
class CMuleListCtrl : public wxListCtrl

The failure might be wxListCtrl is unKnown at the step of compilation, that suposed to be included in file "wx/listctrl.h"
anybody Suggest me a method to be able to know if really wx/listctrl.h is been included or  to determine if wxListCtrl has been declared?
Title: Re: HowTo compile aMule on Windows
Post by: antenon on February 14, 2005, 05:32:59 PM
(I refeared to something like #warning or so )
Title: Re: HowTo compile aMule on Windows
Post by: antenon on February 14, 2005, 06:04:37 PM
53 #ifdef __WXMSW__
54   #include
55
56 wxListCtrl prueba; //new (test)
57
58   class CMuleListCtrl : public wxListCtrl
59 #else
60   #include "listctrl_gen.h"
61   class CMuleListCtrl : public wxODListCtrl
62 #endif


Compiling...
SearchListCtrl.cpp
In file included from src\SearchListCtrl.h:32,
from src\SearchListCtrl.cpp:26:
src\MuleListCtrl.h:56: error: 'wxListCtrl' is used as a type, but is not
defined as a type.

ummmm, this means something......?
Title: Re: HowTo compile aMule on Windows
Post by: antenon on February 14, 2005, 08:20:17 PM
Ive just solved the problem
Title: Re: HowTo compile aMule on Windows
Post by: Kry on February 15, 2005, 01:36:17 AM
nice ;)
Title: does it compile on ReactOS...?
Post by: rebroad on May 02, 2005, 12:13:13 AM
Subject says it all really...
Title: RE: HowTo compile aMule on Windows
Post by: rebroad on May 02, 2005, 12:33:38 AM
Quote
Originally posted by Jacobo221
The HowTo on how to compile aMule on Windows platforms is now on WIki at
http://www.amule.org/wiki/index.php/HowTo_compile_on_Win32

It's just the same as the document in sources, but in rich format.

Check out the discussion page also: http://www.amule.org/wiki/index.php/Talk:HowTo_compile_on_Win32
Title: Re: HowTo compile aMule on Windows
Post by: stefanero on May 02, 2005, 08:02:49 AM
well since there have been a lot of fixes for win32 lately it compiles now fine under windowze with wx-2.6.....
just configure and make
when its done you have win32 binary ;)
Title: RE: HowTo compile aMule on Windows
Post by: kab on June 05, 2005, 01:02:28 PM
I have compilled aMule 2.0.2 without problems. It works fine under WindowsXP. The only thing that not work is the ed2k link handler. Does somebody know how I can fix it?
Title: Re: HowTo compile aMule on Windows
Post by: Jacobo221 on August 29, 2005, 10:38:59 AM
the ed2k link handler doesn't work on Windows yet
Title: Re: HowTo compile aMule on Windows
Post by: GrayFox.i0n on January 23, 2008, 12:23:33 PM
I have been following the wiki about how to compile amule (http://www.amule.org/wiki/index.php/HowTo_compile_on_Win32) in Windows

I configured like this:

Code: [Select]
./configure --disable-monolithic --disable-ed2k --enable-amule-gui --disable-debug --enable-optimize
But the output exe is about 80 Mb.

1: how can i reduce the size of the exe?

Sometimes the program just crashes leaving no clue of what happened:

2: How am i supossed to get the information of the crashes?

thanks
Title: Re: HowTo compile aMule on Windows
Post by: wuischke on January 23, 2008, 12:47:11 PM
1. strip the exe. (strip amule.exe), then it should be about 3mb zipped. have you compiled wx with --disable-debug and enable-optimize as well?

2. In this case it is better to enable debug. But starting the program in a terminal (minsys) will already give you some more information about the crash.

BTW: Which version are you using? Did you compile crypto++ by hand?
Title: Re: HowTo compile aMule on Windows
Post by: GrayFox.i0n on January 23, 2008, 02:54:45 PM
cryptopp552 <- by hand

wxMSW-2.8.7 <- compiling just now after configuring like this:

Code: [Select]
./configure --enable-unicode --disable-shared --without-checklistbox --disable-debug --enable-optimize
I still have some issues enabling the geoip feature.... can u give me a clue on how to compile the headers i need for this?

thanks......
Title: Re: HowTo compile aMule on Windows
Post by: wuischke on January 23, 2008, 03:48:50 PM
I'm sorry, I tried to compile libgeoip, but it needs mmap/munmap functions, which are Unix functions. I don't have enough to time to find a hack for this (I'm sure there's a wrapper or something already available), but I'll try it with MS VC++ in the following days.
Title: Re: HowTo compile aMule on Windows
Post by: GrayFox.i0n on January 23, 2008, 03:53:55 PM
Ok, the "strip" command made my 80 Mb amulegui.exe become a 6 Mb one... that was just fine.
I compiled it with the debug flag, and ran it from the minsys console. I performed a search "ubuntu" and just after that, amulegui crashed, closing itself, but i dint get any messages on the console or anything..... can anyone clear me this a bit?

thanks
Title: Re: HowTo compile aMule on Windows
Post by: GrayFox.i0n on January 26, 2008, 01:33:29 PM
Ok, i am trying to prepare the lang packs as well, so i did this, as said in the wiki:

cd
cd amule-2.0.3/po
Now install the languages:
make install-data-yes
This language files are now in C:\MSys\1.0\local\share\locale, so exit MSys, go to C:\msys\1.0\local\share\locale and copy that folder to the folder were you are keeping your compiled amule.exe and amulegui.exe files.


But when i open aMule, and i go to preferences, i dont get any language but the "System default"

Thanks
Title: Re: HowTo compile aMule on Windows
Post by: wuischke on January 26, 2008, 03:28:04 PM
You just hit another point in my todo-list: I don't know why this doesn't work, I'm sorry. I've tried it with all folders the wx help mentioned and all I could think of, but something isn't working as it should. I can't promise anything, but I'll try to have another look at it later.
Title: Re: HowTo compile aMule on Windows
Post by: GrayFox.i0n on January 26, 2008, 03:29:55 PM
Thanks, take yor time.  :D ;)