Chris@23: Chris@23: The Vamp Plugin SDK -- Platform Notes for Visual C++ on Windows Chris@23: =============================================================== Chris@23: Chris@23: Visual C++ Project Files Chris@23: ------------------------ Chris@23: Chris@23: Three Visual C++ project files are included with the SDK: Chris@23: Chris@23: - build/VampPluginSDK.vcproj Chris@23: Chris@23: This builds the plugin SDK into a single static library, but does Chris@23: not build the example plugins, the host SDK, or the host. (We Chris@23: recommend using static linkage for the SDK rather than distributing Chris@23: it as a DLL, particularly when building plugins.) Chris@23: Chris@23: - build/VampHostSDK.vcproj Chris@23: Chris@23: This builds the host SDK into a single static library, but does not Chris@23: build the plugin SDK, example plugins, or host. Chris@23: Chris@23: - build/VampExamplePlugins.vcproj Chris@23: Chris@23: This builds the example plugins DLL, but does not build the plugin Chris@23: or host SDKs or the host. You don't need to build the plugin SDK Chris@23: before this, because this project simply includes the plugin SDK Chris@23: files rather than using the library. Chris@23: Chris@23: Of course, when using Visual Studio or another IDE to build a plugin Chris@23: or host using the SDK, you may simply add the .h and .cpp files in the Chris@23: vamp-sdk or vamp-hostsdk directories to your existing project. This Chris@23: is the approach taken in the VampExamplePlugins project. Chris@23: Chris@23: As the command-line host has additional library dependencies (namely Chris@23: libsndfile), no pre-packaged project is included to build it. Chris@23: Chris@23: Chris@23: Installing the Example Plugins Chris@23: ------------------------------ Chris@23: Chris@23: To install the example plugins so you can load them in Vamp hosts, Chris@23: copy the files Chris@23: Chris@23: build\release\vamp-example-plugins.dll Chris@23: and Chris@23: examples\vamp-example-plugins.cat Chris@23: Chris@23: to Chris@23: Chris@23: C:\Program Files\Vamp Plugins Chris@23: Chris@23: Chris@23: Plugin Linkage Chris@23: -------------- Chris@23: Chris@23: Vamp plugins are distributed as dynamic libraries (DLLs). A properly Chris@23: packaged Vamp plugin DLL should export exactly one public symbol, Chris@23: namely the Vamp API entry point vampGetPluginDescriptor. Chris@23: Chris@23: One nice tidy way to achieve this with Visual Studio is to add the Chris@23: linker option /EXPORT:vampGetPluginDescriptor to your project. (All Chris@23: of the other symbols will be properly hidden, because that is the Chris@23: default for the Visual Studio linker.) The included example plugins Chris@23: project in build/VampExamplePlugins.vcproj does this. Chris@23: Chris@23: Alternatively, you may modify vamp/vamp.h to add the Chris@23: __declspec(dllexport) attribute to the vampGetPluginDescriptor Chris@23: declaration. This is not present by default, because it isn't Chris@23: portable and, as we only want one symbol exported, the above linker Chris@23: option works equally well without code changes. Chris@23: Chris@23: (If you don't take at least one of these actions, your plugin library Chris@23: simply will not load in any host.) Chris@23: Chris@23: Chris@23: Using MinGW/Cygwin Chris@23: ------------------ Chris@23: Chris@23: Refer to README.linux for build instructions using the GNU toolchain. Chris@23: Chris@23: Chris@23: Test Your Plugins Chris@23: ----------------- Chris@23: Chris@23: The Vamp Plugin Tester is a vital utility which you can use to test Chris@23: your plugins for common problems. It can help you if you're having Chris@23: problems getting your plugin to work at all, and you're strongly Chris@23: advised to use it before you release anything. Download it from the Chris@23: Vamp plugins site now! Chris@23: