back to ch6 back to table of contents

6.5.1 Windows resources

Directory pure-data/msw contains support files for building a Pure Data Windows application, as it is built for the ‘vanilla’ releases on

Notes about compiling on Microsoft Windows

As of Pd version 0.50, all releases are compiled using Dan Wilcox’s scripts,, and optionally (which builds a version of TCL/TK in case you don’t already have one).

The Pd sources aren’t completely self-contained: Because of licensing restrictions, the ASIO support files are not included in the Pd source tree. The script presumes you’ve downloaded the ASIO SDK and can point to it.

It’s also possible to compile Pd using Visual C. This is not managed automatically but you can look in “” to see how it can be done. This compiler gives different warnings which are sometimes useful, and refuses to compile code that has variable declarations in the middle of a block. It’s a good idea to test pull requests against MSVC if you can. The file “” contains all the garbage that Pd needs in addition to its own files, including tcl/tk. MSVC compilation works in 32 bits only.

The scripts and are the ones used by Miller to make Pd releases. These files work on Linux only and will not work out of the box unless your file tree resembles Miller’s in some ways (pd source is in ~/pd for instance) but you can presumably make your own version if you need to.

But to first get things working, it’s best to use and directly.

Pd Application Directory

Pd for Windows is essentially a stand-alone application directory which contains the compiled binaries, resource files, and contextual information.

The basic layout is:

  /bin      <- pd binaries
  /doc      <- built in docs & help files
  /extra    <- core externals
  /font     <- included fonts
  /lib      <- embedded Tcl/Tk frameworks
  /po       <- text translation files
  /src      <- Pd source header files
  /tcl      <- Pd GUI scripts

The Pure Data GUI utilizes the Tk windowing shell aka “wish##.exe” at runtime which is included with Pd in the /bin directory. A Pure Data app directory includes both the Pd binaries and resources as well as a precompiled Tk.

App Bundle Helpers

These scripts complement the autotools build system described in INSTALL.txt and are meant to be run after Pd is configured and built. The following usage, for example, downloads and builds 32 bit Tk 8.6.8 which is used to create a Windows pd-0.48-1 directory:

msw/ 8.6.8
msw/ --tk tcltk-8.6.8 0.48-1

Both & have extensive help output using the –help commandline option:

msw/ --help
msw/ --help

The script automates building the Pd app directory and is used in the “make app” makefile target. This default action can be invoked manually after Pd is built:

msw/ 0.47-1

This builds a “pd-0.47-1” directory using the default copy of Tk. If you omit the version argument, a “pd” directory is built. The version argument is only used as a suffix to the directory name.

The “msw/pdprototype.tgz” archive contains the basic requirements for running Pd on Windows: a precompiled copy of Tcl/Tk and various .dll library files. This is the default Tcl/Tk when using msw-app.

If you want to use a newer Tcl/Tk version or a custom build, you can specify the version or directory via commandline options, for example:

# create pd-0.48-1 directory, download and build Tcl/Tk 8.5.19
msw/ --tk 8.5.19 0.48-1

# create pd-0.48-1 directory, use Tcl/Tk 8.5.19 built with
msw/ --tk tcltk-8.5.19 0.48-1

Note: Depending on which version of Tcl/Tk you want to use, you may need to set the Tk Wish command when configuring Pd. To build Pd to use Tk 8.6:

./configure --with-wish=wish86.exe

The script automates building Tcl/Tk for Windows, either from the release distributions or from a git clone:

# build tcltk-8.5.19 directory with Tcl/Tk 8.5.19
msw/ 8.5.19

# build tcltk-master-git with the latest master branch from git
msw/ --git master-git

Once your custom Tcl/Tk is built, you can use it as the Tk directory source for with the -t/–tk option:

# build Pd with a custom Tcl/Tk 8.6.8 directory
msw/ -t tcltk-8.6.8

Downloading and building Tcl/Tk takes some time. If you are doing lots of builds of Pd and/or are experimenting with different versions of Tcl/Tk, building the tcltk directories you need with can save you some time as they can be reused when (re)making the Pd app directory.

Usually, it’s best to use stable releases of Tcl/Tk. However, there are times when building from the current development version is useful. For instance, if there is a bug in the Tcl/Tk sources, you can then see if there is a fix for this in the Tcl/Tk development version on GitHub. If so, then you can test by using the –git commandline option.

The script tries to detect if it’s building in a 64 bit environment, ie. MinGW 64. If this detection fails, you can force 64 bit with the –64bit option:

# force 64 bit Tcl/Tk 8.6.8 build --64bit 8.6.8


Tk cannot load local font files by default on Windows. Pd accomplishes this through a tiny, custom Tcl extension, pdfontloader.dll. On initialization, the Pd GUI tries to load pdfontloader and, if successful, tries to load the included Pd font.

Currently, pdfontloader.dll is pre-built and included within the pdprototype.tgz tarball. To build pdfontloader, see source.

6.5.2. Windows ASIO Support

In order to build ASIO support into Pd on Windows, you need to download the ASIO sources from Steinberg directly. Their license does not let us redistribute their source files.

Install the ASIO SDK by doing the following:

Now build Pd and it should include ASIO as one of the audio backends.

back to ch6 back to table of contents