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