comparison build/README.msvc @ 239:cc467e52da4c

* Add platform README files
author cannam
date Mon, 10 Nov 2008 12:39:19 +0000
parents
children 2e16d99867bd
comparison
equal deleted inserted replaced
238:4b5a3031cd08 239:cc467e52da4c
1
2 The Vamp Plugin SDK -- Platform Notes for Visual C++ on Windows
3 ===============================================================
4
5 Visual C++ Project Files
6 ------------------------
7
8 Three Visual C++ project files are included with the SDK:
9
10 - build/VampPluginSDK.vcproj
11
12 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
14 recommend using static linkage for the SDK rather than distributing
15 it as a DLL, particularly when building plugins.)
16
17 - build/VampHostSDK.vcproj
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
24 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
26 before this, because this project simply includes the plugin SDK
27 files rather than using the library.
28
29 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
31 vamp-sdk or vamp-hostsdk directories to your existing project. This
32 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
37
38 Installing the Example Plugins
39 ------------------------------
40
41 To install the example plugins so you can load them in Vamp hosts,
42 copy the files
43
44 build\release\vamp-example-plugins.dll
45 and
46 examples\vamp-example-plugins.cat
47
48 to
49
50 C:\Program Files\Vamp Plugins
51
52
53 Plugin Linkage
54 --------------
55
56 Vamp plugins are distributed as dynamic libraries (DLLs). A properly
57 packaged Vamp plugin DLL should export exactly one public symbol,
58 namely the Vamp API entry point vampGetPluginDescriptor.
59
60 One nice tidy way to achieve this with Visual Studio is to add the
61 linker option /EXPORT:vampGetPluginDescriptor to your project. (All
62 of the other symbols will be properly hidden, because that is the
63 default for the Visual Studio linker.) The included example plugins
64 project in build/VampExamplePlugins.vcproj does this.
65
66 Alternatively, you may modify vamp/vamp.h to add the
67 __declspec(dllexport) attribute to the vampGetPluginDescriptor
68 declaration. This is not present by default, because it isn't
69 portable and, as we only want one symbol exported, the above linker
70 option works equally well without code changes.
71
72 (If you don't take at least one of these actions, your plugin library
73 simply will not load in any host.)
74
75
76 Using MinGW/Cygwin
77 ------------------
78
79 Refer to README.linux for build instructions using the GNU toolchain.
80