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