comparison build/README.msvc @ 489:7a393db13c75

Update installation notes for MSVC
author Chris Cannam
date Fri, 24 Feb 2017 14:43:58 +0000
parents 2e16d99867bd
children
comparison
equal deleted inserted replaced
488:286240e6d397 489:7a393db13c75
1 1
2 The Vamp Plugin SDK -- Platform Notes for Visual C++ on Windows 2 The Vamp Plugin SDK -- Platform Notes for Visual C++ on Windows
3 =============================================================== 3 ===============================================================
4 4
5 Visual C++ Project Files 5 This version of the SDK is contains project files for Visual C++ 2013
6 ------------------------ 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.
7 8
8 Three Visual C++ project files are included with the SDK:
9 9
10 - build/VampPluginSDK.vcproj 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
11 31
12 This builds the plugin SDK into a single static library, but does 32 This builds the plugin SDK into a single static library, but does
13 not build the example plugins, the host SDK, or the host. (We 33 not build the example plugins, the host SDK, or the host. (We
14 recommend using static linkage for the SDK rather than distributing 34 recommend using static linkage for the SDK rather than distributing
15 it as a DLL, particularly when building plugins.) 35 it as a DLL, particularly when building plugins.)
16 36
17 - build/VampHostSDK.vcproj 37 - build/VampExamplePlugins.vcxproj
18
19 This builds the host SDK into a single static library, but does not
20 build the plugin SDK, example plugins, or host.
21
22 - build/VampExamplePlugins.vcproj
23 38
24 This builds the example plugins DLL, but does not build the plugin 39 This builds the example plugins DLL, but does not build the plugin
25 or host SDKs or the host. You don't need to build the plugin SDK 40 or host SDKs or the host. You don't need to build the plugin SDK
26 before this, because this project simply includes the plugin SDK 41 before this, because this project simply includes the plugin SDK
27 files rather than using the library. 42 files rather than using the library.
28 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
29 Of course, when using Visual Studio or another IDE to build a plugin 54 Of course, when using Visual Studio or another IDE to build a plugin
30 or host using the SDK, you may simply add the .h and .cpp files in the 55 or host using the SDK, you may simply add the .h and .cpp files in the
31 vamp-sdk or vamp-hostsdk directories to your existing project. This 56 vamp-sdk or vamp-hostsdk directories to your existing project. This
32 is the approach taken in the VampExamplePlugins project. 57 is the approach taken in the VampExamplePlugins project.
33
34 As the command-line host has additional library dependencies (namely
35 libsndfile), no pre-packaged project is included to build it.
36 58
37 59
38 Installing the Example Plugins 60 Installing the Example Plugins
39 ------------------------------ 61 ------------------------------
40 62
43 65
44 build\release\vamp-example-plugins.dll 66 build\release\vamp-example-plugins.dll
45 and 67 and
46 examples\vamp-example-plugins.cat 68 examples\vamp-example-plugins.cat
47 69
48 to 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
49 74
50 C:\Program Files\Vamp Plugins 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.
51 82
52 83
53 Plugin Linkage 84 Plugin Linkage
54 -------------- 85 --------------
55 86
59 90
60 One nice tidy way to achieve this with Visual Studio is to add the 91 One nice tidy way to achieve this with Visual Studio is to add the
61 linker option /EXPORT:vampGetPluginDescriptor to your project. (All 92 linker option /EXPORT:vampGetPluginDescriptor to your project. (All
62 of the other symbols will be properly hidden, because that is the 93 of the other symbols will be properly hidden, because that is the
63 default for the Visual Studio linker.) The included example plugins 94 default for the Visual Studio linker.) The included example plugins
64 project in build/VampExamplePlugins.vcproj does this. 95 project in build/VampExamplePlugins.vcxproj does this.
65 96
66 Alternatively, you may modify vamp/vamp.h to add the 97 Alternatively, you may modify vamp/vamp.h to add the
67 __declspec(dllexport) attribute to the vampGetPluginDescriptor 98 __declspec(dllexport) attribute to the vampGetPluginDescriptor
68 declaration. This is not present by default, because it isn't 99 declaration. This is not present by default, because it isn't
69 portable and, as we only want one symbol exported, the above linker 100 portable among compilers and, as we only want one symbol exported, the
70 option works equally well without code changes. 101 above linker option works equally well without code changes.
71 102
72 (If you don't take at least one of these actions, your plugin library 103 (If you don't take at least one of these actions, your plugin library
73 simply will not load in any host.) 104 simply will not load in any host.)
74 105
75 106