1: The Toolchain
NOTE THIS TUTORIAL SET SHOWS YOU THE HARDER WAY TO TO THINGS. CHECK OUT THE SECTION ON BUILDING FROM WITHIN AN IDE FOR THE EASY WAY. SOME MAY STILL FIND IT USEFUL TO SKIM OVER THESE TUTORIALS. In this first tutorial I will explain the tools which you need to download in order to build and test your VST plugins and I will explain step-by-step how to configure everything so even a complete novice (like myself) will be able to get up and running. The essential free tools you need for this tutorial are in the following list, but don’t download anything just yet . . . .
The following is a list of free stuff which will make your life easier:
Ok, firstly we need to get the compiler up and running so go to the MinGW page and head over to the download section. You want to use the automated installer (this is a newbie guide afterall). Download the exe version and run it. You’ll be asked which compilers you want to install, and we only need the c++ stuff (gcc) and not the FORTRAN compilers etc. Save the mingw to your c drive, so something like c:\MinGW. The mingw downloader can be a little temperamental sometimes, so if a file fails to download keep retrying until you have all the files.
The next step is to add the binaries to your path and then check that windows knows where to find your c++ compiler. To do this click on the start menu, then right click on “my computer” and select “properties” from the list. Go to the “advanced” tab and then select the “environment variables button”. You will the be faced with something which looks like the following:
Now in the lower box which is titled “System variables” double click on the Path value. If it doesn’t exist then create it. Move to the end of this string and then add a semicolon and then WITHOUT A SPACE CHARACTER, paste or type the folder in which the c++ compiler resides. If you installed to c:\MinGW, then this will be “c:\mingw\bin”. Ok and apply all changes and now we check if everything works. Open up a command window (start/run/cmd) or the console application if you downloaded it like I suggested, and type “gcc -v” at the prompt without the quotation marks, from any directory. If all has gone well then you will see some info about your compiler.
That is the first hurdle out of the way. Now, most users of the GNU compiler collection may be familiar with a very un-good build tool known as make (excuse the stong opinion, it is just that I was evangelised by a SCons user early on), where as here I will show you how to use a much nicer and more flexible tool known as SCons, which is short for software construction tool. A build, or construction tool runs from a script, which will handle all of the dependencies of your project and special compiler flags etc. Scons will check the md5 check-sum of each of the source files in your project, and if any have changed since the last build, they will be rebuilt. This saves you compile time and a lot of work typing into the command prompt. In the next tutorial you will see how much easier scons syntax is than makefile syntax, but for now we just need to get it up and running.
Go to the python site, download and install the latest release of version 2.5 **DON’T BE TEMPTED TO GET A NEWER VERSION** as this may not be compatible with SCons, however, this is likely to change from the time this tutorial was written (be sure to check SCons site). Once you have done this you must download install SCons from the link at the top of this page. SCons will detect the version of python which you just installed and will attach itself to the python install. To let windows know trhat scons exists, you must add it to your path using the same procedure outlined for adding mingw to your path, however this time you must add “c:\python25\scripts;” after the last semicolon with no spaces if you have installed python to c:\python25. To see if this has worked, you need to open your console window once again and type “scons -v”.
To install the final part of this jigsaw puzzle, head over to the Steinberg site and go to the company / third party developers section and download the 2.4 version of the sdk (you will need to register with the site first) and extract it to c:\vstsdk2.4. Most developers on the web and forums are using version 2.4 of the sdk as few vst hosts support the vst 3.0 standard and there is apparently little to gain from trying to develop under 3.0. You now have all the tools required to build your first plugins. See the next tutorial.