home changes contents help options

This page is meant to be a short tutorial on how to build a Pd external in Apple's Xcode. In particular, it explains how to build the "hello world" example from the Pd externals Howto.

The following is what has to be done in Xcode 2, nevertheless Xcode 3 is quite the same in this respect.

Prerequisites

First of all, you need to download the Pd source code from the downloads section and unpack it. As far as this tutorial is concerned, the actual location of the files doesn't matter, but we'll need the source code later to invoke m_pd.h.

1. Setting up the project

Having started Xcode, first create a new project. the project type you're looking for is "BSD Dynamic Library" in the "Dynamic Library" section.

In the main window, select the target with the name of your project (probably there's only one anyway) and open the target informations (e.g. via command-i)

Click the "Build" button in the upper section of the window. Look for the following settings and change them to these values:

2. The source files

We only need two source files for our project:

3. Build the target

Nothing more to say about this - just be careful with the "Debug" and "Build" settings - you could have changed the target settings for one and try to build the other.

4. Move the product file

The last step is to move the resulting helloworld.pd_darwin from Xcode's build directory to a directory that pd knows about - which is for instance /Library/Pd/ (maybe has to be created first)

5. Start Pd

The external should be available now.