annotate src/vamp-plugin-sdk-2.5/build/README.msvc @ 23:619f715526df sv_v2.1

Update Vamp plugin SDK to 2.5
author Chris Cannam
date Thu, 09 May 2013 10:52:46 +0100
parents
children
rev   line source
Chris@23 1
Chris@23 2 The Vamp Plugin SDK -- Platform Notes for Visual C++ on Windows
Chris@23 3 ===============================================================
Chris@23 4
Chris@23 5 Visual C++ Project Files
Chris@23 6 ------------------------
Chris@23 7
Chris@23 8 Three Visual C++ project files are included with the SDK:
Chris@23 9
Chris@23 10 - build/VampPluginSDK.vcproj
Chris@23 11
Chris@23 12 This builds the plugin SDK into a single static library, but does
Chris@23 13 not build the example plugins, the host SDK, or the host. (We
Chris@23 14 recommend using static linkage for the SDK rather than distributing
Chris@23 15 it as a DLL, particularly when building plugins.)
Chris@23 16
Chris@23 17 - build/VampHostSDK.vcproj
Chris@23 18
Chris@23 19 This builds the host SDK into a single static library, but does not
Chris@23 20 build the plugin SDK, example plugins, or host.
Chris@23 21
Chris@23 22 - build/VampExamplePlugins.vcproj
Chris@23 23
Chris@23 24 This builds the example plugins DLL, but does not build the plugin
Chris@23 25 or host SDKs or the host. You don't need to build the plugin SDK
Chris@23 26 before this, because this project simply includes the plugin SDK
Chris@23 27 files rather than using the library.
Chris@23 28
Chris@23 29 Of course, when using Visual Studio or another IDE to build a plugin
Chris@23 30 or host using the SDK, you may simply add the .h and .cpp files in the
Chris@23 31 vamp-sdk or vamp-hostsdk directories to your existing project. This
Chris@23 32 is the approach taken in the VampExamplePlugins project.
Chris@23 33
Chris@23 34 As the command-line host has additional library dependencies (namely
Chris@23 35 libsndfile), no pre-packaged project is included to build it.
Chris@23 36
Chris@23 37
Chris@23 38 Installing the Example Plugins
Chris@23 39 ------------------------------
Chris@23 40
Chris@23 41 To install the example plugins so you can load them in Vamp hosts,
Chris@23 42 copy the files
Chris@23 43
Chris@23 44 build\release\vamp-example-plugins.dll
Chris@23 45 and
Chris@23 46 examples\vamp-example-plugins.cat
Chris@23 47
Chris@23 48 to
Chris@23 49
Chris@23 50 C:\Program Files\Vamp Plugins
Chris@23 51
Chris@23 52
Chris@23 53 Plugin Linkage
Chris@23 54 --------------
Chris@23 55
Chris@23 56 Vamp plugins are distributed as dynamic libraries (DLLs). A properly
Chris@23 57 packaged Vamp plugin DLL should export exactly one public symbol,
Chris@23 58 namely the Vamp API entry point vampGetPluginDescriptor.
Chris@23 59
Chris@23 60 One nice tidy way to achieve this with Visual Studio is to add the
Chris@23 61 linker option /EXPORT:vampGetPluginDescriptor to your project. (All
Chris@23 62 of the other symbols will be properly hidden, because that is the
Chris@23 63 default for the Visual Studio linker.) The included example plugins
Chris@23 64 project in build/VampExamplePlugins.vcproj does this.
Chris@23 65
Chris@23 66 Alternatively, you may modify vamp/vamp.h to add the
Chris@23 67 __declspec(dllexport) attribute to the vampGetPluginDescriptor
Chris@23 68 declaration. This is not present by default, because it isn't
Chris@23 69 portable and, as we only want one symbol exported, the above linker
Chris@23 70 option works equally well without code changes.
Chris@23 71
Chris@23 72 (If you don't take at least one of these actions, your plugin library
Chris@23 73 simply will not load in any host.)
Chris@23 74
Chris@23 75
Chris@23 76 Using MinGW/Cygwin
Chris@23 77 ------------------
Chris@23 78
Chris@23 79 Refer to README.linux for build instructions using the GNU toolchain.
Chris@23 80
Chris@23 81
Chris@23 82 Test Your Plugins
Chris@23 83 -----------------
Chris@23 84
Chris@23 85 The Vamp Plugin Tester is a vital utility which you can use to test
Chris@23 86 your plugins for common problems. It can help you if you're having
Chris@23 87 problems getting your plugin to work at all, and you're strongly
Chris@23 88 advised to use it before you release anything. Download it from the
Chris@23 89 Vamp plugins site now!
Chris@23 90