annotate build/README.msvc @ 377:e43186ff8854

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