tags:

views:

813

answers:

1

How do I build a VST plugin on Mac without using Xcode? (I'm using Code::Blocks).

+2  A: 

If you really insist on bypassing Xcode, you should just go ahead and use 'make', which probably will prove to be just as much of a pain as trying to use Code::Blocks. Although Xcode might feel strange at first, it will really save you a lot of headache to drink the kool-aid and deal it, especially if you plan on developing commercial VST plugins. If you dislike it's editor, for instance, then you can easily replace it with another one of your choosing. But speaking as a fellow Mac VST developer here, Xcode's biggest advantage is really that it's good at taking care of "mac-centric" stuff; ie, building proper bundles, universal binaries, resource editing, linking against system frameworks, etc. Plus, all of the documentation you'll find out there (plus other online VST dev communities like KVR) are Xcode users.

Anyways, should you choose not to heed my advice, it should still be possible to do it the old fashioned way. :)

In principle, a VST is basically just a dynamic library bundle, so regardless of the IDE you're using, you just need to make sure that it is packaged correctly and contains the appropriate resources, or else the host won't be able to load it. If you don't know exactly what that includes, just poke around in some other VST's and see what they've got inside of the bundles. To build, you compile your sources plus the VST SDK, and link the following frameworks to it:

  • ApplicationService
  • Carbon
  • QuickTime
  • System

...and you'll probably need some others, depending on what parts of Carbon you end up using. You should also build as a UB, or else you'll end up really irritating a lot of producers still using G4/5's. Then, you need to create a PkgInfo file which will go into the bundle's resource directory, which must contain the text: "BNDL????" (no quotes, of course). You also must create a standard Info.plist file for your plugin, which will point the system to the name of the actual executable filename which gets loaded and some other information which shows up in the Finder. Again, if you don't know what needs to be there, borrow a copy from a working VST and edit to taste.

Nik Reiman