Personal tools
You are here: Home documentation developer Building Pd on MinGW/Windows HOWTO
Document Actions

Building Pd on MinGW/Windows HOWTO

by Hans-Christoph Steiner last modified 2009-11-03 08:07 AM

Pd is easily built with free tools on Microsoft Windows. While you could probably use the most current versions of all of the packages below, the links provided are versions that are known to work.

Cygwin
Cygwin is relatively easy to install. MinGW lacks full support for some of the GNU utils, so install Cygwin's version also.
Download setup.exe and run it to install Cygwin. Install it in the default location.
Once you get to the Select Packages screen, click the button on the upper right corner labeled View and change it to Full. Now find svn, make, openssh, patch, and sed and make sure they are set to install. This is represented by a version number to be installed instead of Skip.
MinGW
Download the MinGW package installer and run it.
MinGW-5.1.4.exe
Choose the Candidate distribution. Install the defaults and add the g++ compiler, g77 compiler, and MinGW make
Or you can just download my MinGW install, MinGW-Pd.tar.bz2, and uncompress it so that its installed into C:\MinGW. This includes most of the libraries listed below.
MSYS/msysDTK
Install these with all of the defaults:
MSYS-1.0.10.exe
msysDTK-1.0.1.exe

Now you will be using the MSYS shell that was installed from the MSYS installer. You can launch it from the Desktop shortcut or Start -> Programs -> MinGW -> MSYS -> msys

Once you are in the MSYS shell, you need to make /usr/local by running:

mkdir /usr/local
Now edit C:\msys\1.0\etc\fstab, or from within the MSYS shell, /etc/fstab. In that file, make sure you have these two lines (case is important!):
c:/MinGW /mingw
c:/MinGW /usr/local

Then quit all MSYS shells, and restart an MSYS shell, and check with the mount command that both of the above directories are mounted. To do that, run mount. You should see these lines within the rest:

...
c:\MinGW on /mingw type user (binmode)
c:\MinGW on /usr/local type user (binmode)
...
autoconf

Now open an MSYS shell, and run autoconf --version to check to see that you have autoconf 2.59:

$ autoconf --version
autoconf (GNU Autoconf) 2.59
Written by David J. MacKenzie and Akim Demaille.

Copyright (C) 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Otherwise, you need to upgrade autoconf: Some of the externals need a newer version of autoconf, so you need to manually upgrade it, or use Cygwin's autoconf manually. To upgrade autoconf in MSYS, first download msys-autoconf-2.59.tar.bz2 and save it in C:\msys\1.0\. Now open a Cygwin shell and run these commands:

cd /cygdrive/c/msys/1.0
tar xjf msys-autoconf-2.59.tar.bz2
ASIO SDK
You have to agree to Steinberg's license, then submit an email address, then they'll send you the download URL in an email (you may have to wait a day and/or email webmaster@steinberg.net to get registration to really activate - fh ). Uncompress asiosdk2.1.zip, go back to the MinGW console and install these files:
unzip asiosdk2.2.zip
mkdir /usr/local/include
cp ASIOSDK2/common/*.h /usr/local/include
cp ASIOSDK2/host/*.h /usr/local/include
cp ASIOSDK2/host/pc/*.h /usr/local/include
mkdir /path/to/pd/asio
cp ASIOSDK2/common/asio.cpp /path/to/pd/asio
cp ASIOSDK2/host/asiodrivers.cpp /path/to/pd/asio
cp ASIOSDK2/host/pc/asiolist.cpp /path/to/pd/asio

With the update to portaudio, you need to modify one of the ASIO headers to make things compile properly (from the portaudio list). In the file C:\MinGW\include\combase.h, change this line:

#if WINVER < 0x0501

To this line:

#if 0

Install Inno Setup package building

Inno Setup/ISTool
Inno Setup is free installer generator for Windows. ISTool is a nicer IDE for Inno scripts. This is used to assemble the Pd-extended installer.
ispack-5.2.3.exe downloads and installs everything for you.

Building from SVN '/sources'

For the rest of the libraries, you can get the sources from SVN and run this script to build it all:

cd pure-data
svn co https://pure-data.svn.sourceforge.net/svnroot/pure-data/sources
cd sources
./build-libs-on-mingw.sh

This will run for a while, and if it completes successfully, it will have installed all of the libraries needed for Pd-extended. It should be safe to run ./build-libs-on-mingw.sh again if something failed.

Building Pd-extended with MinGW

./configure doesn't yet work with MinGW, so you have to use this

svn co https://pure-data.svn.sourceforge.net/svnroot/pure-data/branches/pd-extended/0.41/
cd 0.41/pd/src
make -f makefile.mingw


Powered by IEM Powered by Plone Section 508 WCAG Valid XHTML Valid CSS Usable in any browser