To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.

Statistics Download as Zip
| Branch: | Tag: | Revision:

root / build / README.msvc @ 489:7a393db13c75

History | View | Annotate | Download (4 KB)

1

    
2
The Vamp Plugin SDK -- Platform Notes for Visual C++ on Windows
3
===============================================================
4

    
5
This version of the SDK is contains project files for Visual C++ 2013
6
or newer. You can build the SDK in either 32-bit or 64-bit (x64) mode,
7
but remember that a 32-bit host generally cannot load 64-bit plugins.
8

    
9

    
10
Visual C++ Projects and Solution Files
11
--------------------------------------
12

    
13
Two Visual C++ solution files are included:
14

    
15
 - build/VampSDK.sln
16

    
17
   Builds the plugin SDK and the example plugins.
18
   See the VampPluginSDK and VampExamplePlugins projects below.
19

    
20
 - build/VampHostSDK.sln
21

    
22
   Builds the host SDK and the simple-host command-line application.
23
   See the VampHostSDK and VampSimpleHost projects below.
24
   Note that the VampSimpleHost requires the libsndfile library; if
25
   you want to build without that, use the VampHostSDK project rather
26
   than this solution.
27

    
28
Four Visual C++ project files are included:
29

    
30
 - build/VampPluginSDK.vcxproj
31

    
32
   This builds the plugin SDK into a single static library, but does
33
   not build the example plugins, the host SDK, or the host.  (We
34
   recommend using static linkage for the SDK rather than distributing
35
   it as a DLL, particularly when building plugins.)
36

    
37
 - build/VampExamplePlugins.vcxproj
38

    
39
   This builds the example plugins DLL, but does not build the plugin
40
   or host SDKs or the host.  You don't need to build the plugin SDK
41
   before this, because this project simply includes the plugin SDK
42
   files rather than using the library.
43

    
44
 - build/VampHostSDK.vcxproj
45

    
46
   This builds the host SDK into a single static library, but does not
47
   build the plugin SDK, example plugins, or host.
48

    
49
 - build/VampSimpleHost.vcxproj
50

    
51
   This builds the simple host command line program. You must have
52
   the libsndfile library installed in order to build this project.
53

    
54
Of course, when using Visual Studio or another IDE to build a plugin
55
or host using the SDK, you may simply add the .h and .cpp files in the
56
vamp-sdk or vamp-hostsdk directories to your existing project.  This
57
is the approach taken in the VampExamplePlugins project.
58

    
59

    
60
Installing the Example Plugins
61
------------------------------
62

    
63
To install the example plugins so you can load them in Vamp hosts,
64
copy the files
65

    
66
   build\release\vamp-example-plugins.dll
67
and
68
   examples\vamp-example-plugins.cat
69

    
70
to the appropriate location as follows:
71

    
72
 * For 32-bit plugins running on a 32-bit system, and
73
   for 64-bit plugins running on a 64-bit system
74

    
75
   C:\Program Files\Vamp Plugins
76

    
77
 * For 32-bit plugins running on a 64-bit system
78

    
79
   C:\Program Files\Vamp Plugins (x86)
80

    
81
You cannot use 64-bit plugins on a 32-bit system.
82

    
83

    
84
Plugin Linkage
85
--------------
86

    
87
Vamp plugins are distributed as dynamic libraries (DLLs).  A properly
88
packaged Vamp plugin DLL should export exactly one public symbol,
89
namely the Vamp API entry point vampGetPluginDescriptor.
90

    
91
One nice tidy way to achieve this with Visual Studio is to add the
92
linker option /EXPORT:vampGetPluginDescriptor to your project.  (All
93
of the other symbols will be properly hidden, because that is the
94
default for the Visual Studio linker.)  The included example plugins
95
project in build/VampExamplePlugins.vcxproj does this.
96

    
97
Alternatively, you may modify vamp/vamp.h to add the
98
__declspec(dllexport) attribute to the vampGetPluginDescriptor
99
declaration.  This is not present by default, because it isn't
100
portable among compilers and, as we only want one symbol exported, the
101
above linker option works equally well without code changes.
102

    
103
(If you don't take at least one of these actions, your plugin library
104
simply will not load in any host.)
105

    
106

    
107
Using MinGW/Cygwin
108
------------------
109

    
110
Refer to README.linux for build instructions using the GNU toolchain.
111

    
112

    
113
Test Your Plugins
114
-----------------
115

    
116
The Vamp Plugin Tester is a vital utility which you can use to test
117
your plugins for common problems.  It can help you if you're having
118
problems getting your plugin to work at all, and you're strongly
119
advised to use it before you release anything.  Download it from the
120
Vamp plugins site now!
121