annotate src/vamp-plugin-sdk-2.4/build/README.msvc @ 146:206f0eb279b8

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