Music Player Daemon Community Wiki

Building GMPC for Windows

522pages on
this wiki
Add New Page
Talk0 Share

Building GMPC for Windows Edit

Introduction Edit

The current gmpc-win32 build system is designed to cross-compile gmpc from a Unix-like system. It is primarily developed on Debian, so specific instructions will be given for that OS only. Setting up the build system on other Unix-like systems should be a simple matter of installing the correct packages prior to following the rest of the instructions.

Building on Windows Edit

While it should be possible to port the build system to Cygwin, it has never been done. Currently, the easiest way to build gmpc-win32 on Windows is using a virtualized installation of a Unix-like system. The following is a brief tutorial for installing Debian inside of a VirtualBox virtual machine on Windows.

Setting Up VirtualBox Edit

  • Download and install the latest version of VirtualBox.
  • Download an i386 Debian ISO.
  • Run VirtualBox and create a new virtual machine using the New Virtual Machine Wizard.
  • Open the settings dialog for the newly created virtual machine and navigate to the CD/DVD-ROM section.
  • Check the Mount CD/DVD Drive checkbox, and select the ISO Image File option.
  • Clicking the folder icon next to the dropdown box will open the Virtual Disk Manager.
  • Click Add and browse to the previously downloaded Debian ISO. Once you've added it, highlight it and hit Select.

Setting Up Debian Edit

  • Start the virtual machine and follow the Debian installation wizard.
  • Once Debian has been installed, you may optionally install the VirtualBox Guest Additions.
    • Log in as root.
    • Install the necessary build tools using apt-get install make gcc.
    • Determine the name of the linux-kbuild package using apt-cache search linux-kbuild. Install it using apt-get install <package>. For example, apt-get install linux-kbuild-2.6.18.
    • Determine your kernel version using dpkg -l | grep linux-image. Install the corresponding linux-headers package using apt-get install <package>. For example, apt-get install linux-headers-2.6-486.
    • Select Machine -> Install Guest Additions… from the virtual machine menu.
    • Mount the CD using mount /media/cdrom.
    • Install all guest additions except for the X11 driver by using the command sh /media/cdrom/ kernel-module vfs-module timesync.
    • Reboot Debian using shutdown -r now.

Build Dependencies Edit

To build gmpc and it's required libraries, you will need the following packages installed on your Unix-like system. Debian package names are listed in parenthesis if it's not the same as the proper package name. On Debian, you can use apt-get install <package> to install these.

The Scripts Edit

There are three scripts used to build gmpc and it's plugins:


Used to build various programs and libraries for Windows (including libmpd and gmpc).


Used to automatically update libmpd and gmpc from svn and build a gmpc-win32 package.


Used to update all of the configured plugins from svn.

Only the first is necessary to actually build gmpc. Usage of the others will not be covered by this document. They will likely require more work to get working. Use them at your own risk.

You should place somewhere in $PATH. Preferably in ~/bin (provided it's in $PATH), as expects it to be there. Be sure to make it executable as well.

Setting Up The Build System Edit

First, you'll need to create a directory to work from. I use ~/win32. If you use something else you'll need to change the prefix variable at the top of From here on out, I will refer to this directory as $prefix.

Next you'll need somewhere to store your source code. I recommend $prefix/src for convenience.

If you're not using Debian, you may also need to modify $CHOST and $CBUILD at the top of

Windows Dependencies Edit

Aside from the dependencies needed to build the various libraries and programs, you will also need some additional libraries for Windows. You should download and unpack their source to your source directory.

GTK+ Development Environment Edit

GNU regex Edit

  • Download regex.
  • Unpack the tarball.
  • cd into the unpacked source directory and run regex.

cURL Edit

  • Download curl.
  • Unpack the tarball.
  • cd into the unpacked source directory and run curl.

Building libmpd and gmpc Edit

Finally, you'll need to build libmpd and gmpc themselves.

libmpd Edit

  • Download libmpd.
  • Unpack the tarball.
  • cd into unpacked source directory and run libmpd.

gmpc Edit

  • Download gmpc.
  • Unpack the tarball.
  • Change Directory into unpacked source directory and run gmpc.

Putting It All Together Edit

Before running gmpc, you will need to place all of the necessary files in the same directory as gmpc.exe. These files are:

  • Everything in gmpc-<version> from your gmpc source directory. For example, ~/win32/src/gmpc-0.15.1/gmpc-0.15.1/*.
  • The libmpd DLL found in $prefix/bin. For example, ~/win32/bin/libmpd-0.dll.
  • The curl DLL found in $prefix/bin. For example, ~/win32/bin/libcurl-4.dll.

Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.