ndc Plugs

Open source VST plugins for Windows and OSX

Setting up XCode to Build a VST Plugin

Note: This tutorial is very likely out of date by now - it's probably only useful if you're still on OSX 10.3.

This is a simple walkthrough of the steps required to build a VST plugin using XCode on OS X. Any references to VSTGUI assume you're using the sourceforge version (which you should be anyway, it's a lot nicer), rather than the older version which comes with the 2.3 VST SDK. Wherever you see <PLUGIN_NAME>, replace it with the name of your plugin/XCode project.

Main Walkthrough

  1. Start a new project (Carbon bundle).
  2. Remove main.c, <PLUGIN_NAME>_Prefix.pch (Source) and InfoPlist.strings (Resources) files.
  3. Go to 'Project->Edit Active Target '<PLUGIN_NAME>'', and select the 'Build' tab.
  4. Point 'Header Search Paths' to the folder you've got the VST SDK in.
  5. Change 'Wrapper Extension' from bundle to vst.
  6. Change 'Installation Path' to $(HOME)/Library/Audio/Plug-Ins/VST/, or wherever you want the plugin installed to.
  7. If you're using VSTGUI:
    • Change 'Prefix Header' to <VSTGUI_PATH>/vstplugsquartz.h.
    If you're not using VSTGUI:
    • Change 'Prefix Header' to <VSTSDK_PATH>/source/common/vstplugsmacho.h.
  8. <Optional> In the 'Properties' tab, set the identifier to something relevant.
  9. Create a blank text file in the 'Resources' section, put BNDL???? in it, and save it as PkgInfo. This is to make sure the OS X Finder sees the plugin as an actual executable, and not just another folder of stuff (which is what a bundle is, really).
  10. Go to 'Project->New Build Phase->New Shell Script Build Phase', and make sure the shell script appears at the end of the list of phases in the 'Targets-><PLUGIN_NAME>' part of the 'Groups & Files' section.
  11. In the window that appears, put cp PkgInfo build/<PLUGIN_NAME>.vst/Contents/ in the Script editor. This is to make sure the PkgInfo file gets copied into the bundle.
  12. Add another shell script, the same way as before, again making sure it appears at the end of the list.
  13. In the window that appears, put cp -r build/<PLUGIN_NAME>.vst $HOME/Library/Audio/Plug-Ins/VST/ in the Script editor. This is is to copy the plugin over to your default plugins folder.
  14. Add the plugin files and the common files from the VST SDK (as well as the VSTGUI files, if you're using it) to your project.

VSTGUI Notes

Configurations/Build Styles Notes

Debugging/Profiling Notes

Binary Size Notes