HowTo compile on Win32 with MinGW

From AMule Project FAQ
Revision as of 02:33, 27 August 2005 by (Talk)

Jump to: navigation, search

Originally by Madcat

English | Deutsch

This wiki page only covers the latest CVS version of aMule, not releases in the 1.x.x or 2.x.x branches.

For those of you that don't want to compile aMule from source, there is also the option of the aMule Windows Installer.

Requirements for compiling aMule

Note: Some of these require manually moving includes and libraries into their correct directories.

Installing the Minimal System

The first step is to create a Linux-like environment, which is required in order to be able to perform the build. This can be done by following these steps in this order:

  • Install MinGW. When it prompts you for a folder, the default is slightly messy but the safer selection.
  • Install MSys. When it prompts you for the MinGW folder, it's very important to specify it correctly. Failure on this step will stop any compilation attempts. If for some reason you fail, install MSys again, or edit the file /etc/fstab in your MSys environment.
  • Install the MSys developer toolkit.

Compiling the libraries

There are two libraries that aMule will need compiled: zlib and wxWidgets.

We will compile them from MSys, so just run it. Once you are running MSys, you'll be on your home folder. Copy the zlib and wxWidgets files you downloaded above into this folder.

The steps for compiling them is:

  • zlib: Uncompress zlib, cd to the newly created directory and run ./configure --prefix=/mingw && make && make install
  • wxWidgets: Uncompress wxWidgets, cd to the newly created directory and run ./configure --disable-shared --without-checklistbox && make && make install

If you want to help us developers, you can add --enable-debug flag to the wxWidgets configure command, right after --disable-shared, but be warned it will result into an aMule.exe file bigger than 100MB.


Ok, we're all done with the compilation environment. Let's do the last step: compiling aMule.

The compilation itself is actually just a matter of following the usual method: ./configure && make. Use your favorite flags on ./configure, for example, --disable-debug will remove debug info, but will also make it harder for us developers to understand the bugs you might find.

You might want to compile just the remote GUI: the flags would be --disable-monolithic --disable-ed2k --enable-amule-gui