From Schmid.wiki
Jump to: navigation, search

Creating VST Plug-ins for Mac OS X

Build using XCode

  • Duplicate the vst 2.4 examples.xcodeproj.
  • Remove example projects if you want.
  • In project settings, set 'Base SDK' to the appropriate OS version.

Should you wish to compile from the command-line, you can use a command like this:

xcodebuild -project my_plugin.xcodeproj -target plugin_name -configuration Debug

Build Using SConstruct

SConstruct file (note: obsolete for VST SDK 2.4):

vstEnvironment = Environment(CPPPATH = [
	'public.sdk/source/midi/',
	'public.sdk/source/common/',
	'pluginterfaces/'
	],
	)

vstLib = vstEnvironment.StaticLibrary('vst', [
	    './pluginterfaces/base/funknown.cpp',
	    './public.sdk/source/common/linkedlist.cpp',
	    './public.sdk/source/common/pluginfactory.cpp',
	    #'./public.sdk/source/common/pluginview.cpp',
	    './public.sdk/source/common/plugparams.cpp',
	    './public.sdk/source/common/plugxmlgui.cpp',
	    #'./public.sdk/source/common/plugguieditor.cpp',
	    #'./public.sdk/source/main/dllmain.cpp',
	    './public.sdk/source/main/macmain.cpp',
	    './public.sdk/source/midi/eventqueue.cpp',
	    './public.sdk/source/midi/midieffect.cpp'
	])

vstPlugin = vstEnvironment.SharedLibrary('midiecho', [
	'public.sdk/samples/midi/midiecho/source/midiecho.cpp',
	'public.sdk/samples/midi/midiecho/source/midiechoentry.cpp'
	],
	CCFLAGS = '-include public.sdk/samples/midi/midiecho/mac/prefixmacho.h',
	LIBPATH = '.',
	LIBS = 'vst',
	LINKFLAGS = '-framework carbon -framework coreservices'
    )